Answer the question
In order to leave comments, you need to log in
How to write value to txt file when clicking on div?
Hello, please tell me, I have a div block, how to write it to a txt file, preferably through onclick somehow the value of this <div onclick="">1234</div>
, the smart template engine, so the problem may arise with the processing and output of php code to the template, how to do this as simply and quickly as possible?
Answer the question
In order to leave comments, you need to log in
You call the ajax function on onclick.
Which birches the text from your diva and sends it to the server. You already write it down there.
Get text from view like this in jquery. You can search for JS yourself, but it's easier.
Send ajax you can see examples from the line here.
I hope you write it down in the file)
Zs. This is if everything is already very short
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question