View Single Post
Old 02-02-2013, 02:33 AM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
sounds like you've done the classic mistake of binding your desired ajax functions to the submit button itself.

Instead of doing that, bind it the forms submit event instead. http://api.jquery.com/submit/


Code:
$("#element").submit(function(e){
e.preventDefault();
//do my ajax submittal etc here
});
- The idea is anything that fires the forms submit event , will be handled the way you intended.
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users

Last edited by DanInMa; 02-02-2013 at 03:40 AM..
DanInMa is offline   Reply With Quote