fetch data in a form without using post?
View Single Post
05-01-2008, 12:01 PM
Join Date: Feb 2008
input type="text" onclick="alert('test')">
The above will work because it's executed on the client's machine, but the php code is parsed before the page is send to the client (on the server) so it is impossible to know when the user will click it.
However you can make an ajax call:
input type="text" onclick="$.get('page.php')">
And page.php will have a call to you function: <?call();"?>
This will work. (The above code uses jQuery library)
- My PBB Game
- My Blog "Gaming With PHP"
View Public Profile
Send a private message to freenity
Visit freenity's homepage!
Find More Posts by freenity