Jump to content


Simple AJAX form submit?


2 replies to this topic

#1 Marxx

    Young Padawan

  • Members
  • Pip
  • 116 posts
  • Gender:Male
  • Location:Finland

Posted 09 September 2007 - 09:02 AM

Hello all!

Can someone guide me here whit this problem?
I'm trying to make simple AJAX form submit but can't just figure it out.. Or let's say that I'm not quite understand this AJAX yet.

I have prototype.js and read something about it that this could be the most simple way to do that?
How? :P

Example in my site. I have this picture comment system and trying to import AJAX in that form.
User simply type his/hers comment and when query is done, that msg would show on comment listing.. Whitout browser reload? Can be done??

Or just contact form. User submit contact form and whitout browser reload that is done and bottom of form would show text like: Thank you for submitting, we will get back to you soon as possible..

So if someone could show little example of code, then I maybe can go from there.. :)

Thanks for all help!

#2 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 09 September 2007 - 12:00 PM

If you goto the Prototype website, there are plenty of documentations to how to use Ajax.Request(). The latest release includes a method for submitting and handling an entire form from one method (Form.request()).

There are plenty of tutorials out there to get you started with AJAX. I have written one myself, with highlights of making it compatible with those without JavaScript (if JavaScript is enabled, it uses AJAX, otherwise it submits the data like a normal form); you can view that by going to My Tutorials on the left under my user info. ;)

#3 Marxx

    Young Padawan

  • Members
  • Pip
  • 116 posts
  • Gender:Male
  • Location:Finland

Posted 09 September 2007 - 05:32 PM

Okey, thanks demonslay..
Will check your tutorial and try to go from there! ;)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users