currently I have a section of my page with jquery tabs. The tabs reference html pages, and each contain a form for someone to enter their details. On clicking the submit button, ideally, their details should be submitted to a mySQL database, and they should then be redirected to a javascript form. I’m not bothered what happens after that, but everything there should happen inside the tab.
I’ve managed to get the mySQL submit working, and I’ve verified that it inserts the data into the database. However, it loads the php submit for the form as a whole new page, rather than staying in the tabs. It also doesn’t redirect, although I may have mistyped something.
I’ve got links to work in the tabs, in that, I placed a link in there and got it to load inside the tab when I clicked on it. I just can’t seem to work out this part though :S
For the form submit, I’m using a php page, which contains the php for writing to the database, followed by a javascript redirect in tags.
Can anyone help? Thanks!
AWESOME guys, thanks loads! It’s finally working. 🙂
If anyone’s interested, this tutorial was pretty helpful. http://www.ryancoughlin.com/2008/11/04/use-jquery-to-submit-form
I think you’re using a regular submission instead of an AJAX one.
If so, read jQuery related documentation:
http://api.jquery.com/category/ajax/
http://api.jquery.com/serialize/
http://api.jquery.com/submit/