Archive for the ‘JavaScript’ Category
FlipV and FlipH filters can be used to flip images vertically or horizontally in IE (These filters works in IE only). the following code shows you how to control an image by using the HTML Select Tag to FlipV, FlipH or Apply both filters at the same time. Read the rest of this entry »
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:
Your browser’s address bar (URL bar) can be used to inject JavaScript code directly into the webpage you are visiting without reloading the page. The following codes are useful to do cookie editing:
First, visit the targeted webpage and inject the following code to view realted cookie’s fields and the values assigned to them.
javascript:alert(document.cookie);
Second, to edit a certain value use:
Read the rest of this entry »
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:
As part of an experiment for testing a new authentication mechanism for web applications (will post more about it sometime in the future) I needed my users to select only four images out of many while filling a form.
I used a CheckBox beside every image and developed a JavaScript code to limit the number of checkboxes allowed to be ticked.
