This is a discussion on "Submit form with AJAX" within the JavaScript Forum section. This forum, and the thread "Submit form with AJAX are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Submit form with AJAX
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Submit form with AJAX
Hi,
I have been looking for days and I am desperate. I am searching for an AJAX script that can be used to submit any form without page refresh (post or get) then echo the result in a specified div. CAN ANYONE HELP ME? Thanks. |
|
|
|
|||
|
Re: Submit form with AJAX
The easiest way i've seen to implement AJAX is using tinyajax. I've used it a couple of times myself and found it easy to use. You do need php5 though to use it.
|
|
|||
|
Re: Submit form with AJAX
Hi,
Thanks for the response, but unfortunately, my server doesn't have PHP5. I'm gonna try using prototype... But how do I add a "Loading" while the request is being processed? For example: FORM: <div id="updateDiv"> <form id="commentsForm"> <input name="name" type="text"><br> <textarea name="comment" cols="20" rows="3"></textarea><br> <input name="sendbutton" type="button" value="Send" onClick="send();"> </form> </div> JS: <script type="text/javascript"> function send(){ var params = Form.serialize($('commentsForm')); new Ajax.Updater('updateDiv', 'submit.php', {asynchronous:true, parameters: params}); } </script> Thanks. |
![]() |
| Tags |
| submit, form, ajax |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Form submit | longstand | PHP Forum | 6 | Nov 25th, 2007 01:14 |
| Displaying php queries in ajx form like google ajax? | jahphill | Other Programming Languages | 6 | Oct 29th, 2007 23:52 |
| submit many forms - auto submit the same form many times | divs | JavaScript Forum | 0 | May 24th, 2007 10:10 |
| how to submit form | tobymather | Web Page Design | 13 | Apr 17th, 2007 17:09 |
| Submit 1 form to 2 different URLs | alstefani | Classic ASP | 1 | Aug 31st, 2005 05:26 |