View Single Post
Old 02-23-2012, 06:43 AM   PM User | #2
stevenmw
Regular Coder

 
stevenmw's Avatar
 
Join Date: Jun 2007
Location: OK
Posts: 446
Thanks: 26
Thanked 30 Times in 30 Posts
stevenmw is an unknown quantity at this point
I don't know if you took the file out of your action on purpose or not. But your form doesn't have an action at all. It simple says


Code:
action="#"
I'm not fluent in JavaScript, but I would look into submitting forms using PHP and JavaScript.

You can declare what php file to use as the action in your JavaScript. Which in your case should be helpful.

Take a look at this tutorial.
http://www.askaboutphp.com/213/php-a...-the-page.html

Maybe you can take some ideas from this, and apply it to your code. Looking through your script it shouldn't be too hard.


If it were me I would write most of the validation stuff you've got in form-top.js as PHP, and use JavaScript only for submitting the form. But that's just me.


A nice Ajax contact form tutorial is over at http://tutorialzine.com/2009/09/fancy-contact-form/

They;ve gone in a little bit different of a direction than you, but it's a pretty nice script.

Last edited by stevenmw; 02-23-2012 at 06:49 AM..
stevenmw is offline   Reply With Quote