ClanKiller.com
http://forums.clankiller.com/

IE6 & IE7 form submission gotcha
http://forums.clankiller.com/viewtopic.php?f=24&t=2617
Page 1 of 1

Author:  Satis [ Tue Sep 25, 2007 11:53 am ]
Post subject:  IE6 & IE7 form submission gotcha

Well, this is odd. I discovered this by accident (of course).

Take a form like this:

Code:
<form method='post'>
<input name='test'>
<input type='submit' name='mysubmit' value='done'>
</form>


Fill in something in test and click the submit button, you get url like

http://whatever.html?test=whatever&mysubmit=done

However, if you fill out test and hit the enter key on the keyboard, you get

http://whatever.html?test=whatever

It ignores the key/value pair of the submit button. Firefox, of course, does not do this. Very freakin' weird.

Author:  Pig [ Tue Sep 25, 2007 11:58 am ]
Post subject: 

Word up. That's why you should not rely on the presence of the submit variable to see if you should process something. eg: if( $_GET['submit'] )... Most people include a hidden form field as the trigger instead. IE is teh suck.

Author:  Satis [ Tue Sep 25, 2007 1:50 pm ]
Post subject: 

on an unrelated note, I've found that in transitional mode, Firefox is alot more forgiving than IE7. Like too forgiving. I've forgotten to close tags and firefox just keeps on going while IE7 refuses to render it. I prefer IE7's behaviour, I think. I can't use strict because I don't write valid html. :P

I actually made a serious mistake in javascript earlier and somehow firefox kept working and IE puked. I mean, it was a big mistake... I changed the name of a variable but forgot to change it in one spot of the function. It shouldn't have worked at all, period. Too bad IE7's script debugging capabilities are so crappy.

Author:  Pig [ Tue Sep 25, 2007 3:04 pm ]
Post subject: 

IE specific errors are the worst because you cannot replicate them on anything with decent debugging info. Bleh. Another way FF sucks, is that it lets you make AJAX calls across subdomains. IE restricts that access, which is safer. I doubt they did it on purpose though.

Author:  Satis [ Thu Sep 27, 2007 7:57 am ]
Post subject: 

hah...you have 1337 posts. Aren't you cool. :p

You can download some script debugging tools for IE7 that make it better than what it is by default (which is NO script debugging capabilities). The tool looks cool but it didn't work for me... though it did at least allow error popups that gave me the line number and an error. Better than the default.

http://www.netshiftmedia.com/netshift/a ... ugging.php

Author:  Pig [ Thu Sep 27, 2007 10:03 am ]
Post subject: 

Damn, that makes me not want to post.

I'm trying out that debugger now. I think I'll break some code and see how it does.

Author:  RB [ Thu Sep 27, 2007 10:19 am ]
Post subject: 

Heh... a digression, but I couldn't help making it. Why did you use JPEG, Sat? The rectangle you captured fits quite to an 8-bit pattern and Pig's avatar is GIF. It disturbed my eye, as I firstly saw distortions characteristic for JPEG and then stated as well that you really posted a JPEG.

Author:  Satis [ Thu Sep 27, 2007 2:21 pm ]
Post subject: 

hah...yea...if I'd thought about it I would've saved it as a gif. But it was just on the fly and I was doing several other things at the same time. :p I got my point across I guess.

Author:  Pig [ Thu Sep 27, 2007 3:18 pm ]
Post subject: 

Meh. Some things are so trivial they are not worth considering.

Author:  RB [ Fri Sep 28, 2007 4:00 am ]
Post subject: 

Yeah, they're to be done without considering. :P

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/