K
K
Kirill Gorelov2015-09-14 22:50:16
PHP
Kirill Gorelov, 2015-09-14 22:50:16

Save record without button click, PHP script?

Hello.
Who will tell you the script which makes auto-save when filling in the textarea field.
What would I write down any text for myself. And in order not to press the "save" button, the text itself was written into a text file.
PS Google didn't help. It only fires when the button is clicked.
And that would not create a separate topic. One more question.
How the positions of blocks on the site page are saved.
Example: tympanus.net/Development/ElasticSVGElements/drag.html
How to make sure that the position of the blocks on the page is preserved? Well, respectively, is this an example in php or java?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Novikov, 2015-09-14
@Kirill-Gorelov

to move blocks, it is convenient to use this thing: https://jqueryui.com/draggable/
on the first question, the scheme is as follows:
connect jquery,
hang a keyup event handler on the textarea
, send the contents of the textarea to the php script via ajax.
in a php script, everything is elementary: open the file for writing, delete everything, write the received content, save the file, close it.

D
dk-web, 2015-09-15
@dk-web

Kirill Gorelov : I implemented such a thing through loss of focus... $(selector).on('focusout', function()... left the textarea and after 5 seconds the data is sent to the address

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question