Jump to content


AJAX Form Submission


6 replies to this topic

#1 Chris.

    Young Padawan

  • Members
  • Pip
  • 129 posts
  • Gender:Male

Posted 05 May 2007 - 10:12 PM

I need an AJAX form submission script. I looked on P2L, and only found one tutorial. It didn't work.. I followed everything in the tutorial, and nothing happened. Does anyone have a script that I can use, and learn from? All the tutorials I found didn't really teach me anything, or help me at all. Thanks!

- Chris

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 06 May 2007 - 01:33 AM

Could you explain, AJAX form submission is kind of vague, considering the fact that AJAX can't submit forms...

You should probably read into event handling, particularly the onSubmit event, and then piece together the rest from other tutorials. That's the beauty of them. They are guides to how to do general stuff in a specific way. Just because it doesn't have the title you want doesn't mean it is not the tutorial you are looking for.

#3 Chris.

    Young Padawan

  • Members
  • Pip
  • 129 posts
  • Gender:Male

Posted 06 May 2007 - 11:03 AM

I want a script that will submit the form without having to reload the page. Like I can show a little loading bar or something, and then when the loading bar gets to 100% the post is there on the page. I have seen this done before, and the only place I can think of off the top of my head is Deadman2.com, http://www.deadman2.com/Blog/May/05/2007/2...!/#comments. If you make a comment at the bottom, you will see what I mean.

THanks!

So... any updates?

Bump?

Edited by rc69, 09 May 2007 - 08:49 PM.


#4 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 09 May 2007 - 08:51 PM

Stop bumping, your post hasn't even left the first page yet. If anybody has any ideas, they will post them.

My idea, you're looking in the wrong place. You want a complete tutorial. You won't find that. Look for part tutorials that involve a piece of what you are trying to accomplish.

General AJAX use, accessing form data, event handling, and DOM/innerHTML modification is all i can think of that you'll need.

Edited by rc69, 09 May 2007 - 08:53 PM.


#5 Chris.

    Young Padawan

  • Members
  • Pip
  • 129 posts
  • Gender:Male

Posted 09 May 2007 - 09:20 PM

Okay, sir. Calm down. I am just anxious. But, I kept bumping because I know a lot of people just look at the last post on the main page, and just look at that. THey don't even look at posts below it, unless that person made the topic.

#6 Av-

    I Feel Left Out

  • Members
  • PipPipPipPip
  • 1,971 posts
  • Gender:Male
  • Location:10 ft. below sea level

Posted 10 May 2007 - 06:44 AM

Why don't you take a look at Jquery. It's what I use and I love it.

Ajax documentation: http://docs.jquery.com/Ajax

#7 bag

    Young Padawan

  • Members
  • Pip
  • 2 posts
  • Gender:Male
  • Location:Uk

Posted 27 May 2007 - 11:32 PM

Hey, dunno if im to late, but i've actually just written a script designed to do pretty much what your asking (i think). Although i haven't yet had time to clean it up and write it up in to a proper tutorial yet, i though it may still be of use to you <3
Edit:I just finished writing it up in to a tutorial you can now find it here http://thybag.co.uk/...utorials&ind=45 or at the end of the p2l tutorial approval que.

Edited by bag, 28 May 2007 - 12:32 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users