Disable third party JS form submission - Look, someone's on that tree
Mar. 13th, 2011
04:29 pm - Disable third party JS form submission
Let's say you have a very nice form on your page and you dislike people who write user script. Scripts that mess up with your form for example.
Typical form submission with user script would be:
document.forms['targetform'].submit();Very well, lets prevent this! Each form has a submit button, lets add one that has type submit, but in addition has the name 'submit' too (you should know to ignore its value on your server side logic):
This little trick of course is easy to catch and overcome, however it is very easy to implement and will stop the less educated scriptwriters from messing up with your manual form submission requirement.
Current Location: Bulgaria, Varna