Posts Tagged ‘Forms’
JavaScript codes can be injected in the address bars of web browsers to edit online forms before submitting them, bellow I am posting an example for archiving purposes.
Assuming the page has a contact form, where submitted data is sent to an email address included in a hidden HTML input tag as in the following code:
… <form name="ContactForm" action="submit.php" method="post"> <input type="hidden" name="Email" value="admin@website.com" /> … </form>
To change the email address to: myemail@hotmail.com, the following code can be injected:
Who doesnt need to implement a data validation technique along with every online form?
Bellow is a basic javascript code to check that no form is submitted with empty fields:
