Nov
3
3
Tip #4: Do not use input name submit using jQuery trigger(’submit’)
That’s right, this is something I just crossed in one of my project, a form would not submit when requested with $(“form”).trigger(’submit’). This is because my submit input button was using the name.. submit, like in :
-
<input type="submit" name="submit">
Be careful!
2 Comments to “Tip #4: Do not use input name submit using jQuery trigger(’submit’)”
Leave a comment
Articles
Some Tweets
- Confoo schedule is out! my talk, jquery spaghetti, will be thursday 13:30! Right after lunch!
- The Open Web Needs You Now http://t.co/KclGKezj
- jquery validation engine 2.5.1 release is coming, some bugfixs in there, you can already grab it from github raw download
- really nice backbone patterns resource, http://t.co/FQLYcoZV
- the best news reader app for android tablet @pulsepad , a joy to read on, no need for all those websites app now..
- Interestingly enough, my fellow developers that had a looked at @weddingdeck app stayed longer than my wedding clients target userbase









Submit doesn’t work also if you use $(‘form’).submit() or even document.form.submit() . It’s just that “submit is not a function.” It’s an input. So naming input elements in forms “submit” is definitely a bad idea.
I could agree more.