Submit form with AJAX

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 1st, 2006, 14:20
Junior Member
Join Date: May 2006
Location: Lebanon
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote

  #2 (permalink)  
Old Jun 1st, 2006, 14:50
Junior Member
Join Date: Apr 2005
Location: Llanelli, South Wales
Age: 28
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to markj Send a message via MSN to markj Send a message via Yahoo to markj
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.
Reply With Quote
  #3 (permalink)  
Old Jun 1st, 2006, 15:09
Junior Member
Join Date: May 2006
Location: Lebanon
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
Reply

Tags
submit, form, ajax

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 09:37.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43