Using images to submit a form. Bug/Feature in IE

Its been a very long time since I posted here. I have been out on a trip and after that busy with the projects. There is nothing new that I have explored in the last few days except for a feature/bug in IE that took a day to figure out.

If you use an image instead of a submit button.

input type="image" name="button1" value="test"..
instead of
input type="submit" name="button2" value="test"..
You will not get the name/value pair on the server in case of IE. Since I mostly use firefox I missed it out completely. Once all the images were changed it was tested on IE and it did not work. After trying out for hours and searching high and low on the internet I finally figure out that incase of an image IE will not send the name/value pair. Instead it will send out button1.x and button1.y, which are the coordinates where the user clicked. So I had to change the complete code to check for button1_x and so on. It was a real pain getting this thing. I guess that adds to the list of 1 more reason why I hate IE.

Comments

Popular posts from this blog

The best mobile development platform for hobbyist programmer

Using Voicemail with Airtel Prepaid Karnataka

Airtel 16Mbps for Impatient Ones