Author |
Message |
Satis
Felix Rex
Joined: Fri Mar 28, 2003 6:01 pm Posts: 16653 Location: On a slope
|
IE6 & IE7 form submission gotcha
Well, this is odd. I discovered this by accident (of course).
Take a form like this:
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.
_________________ They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.
|
Tue Sep 25, 2007 11:53 am |
|
|
Pig
Duke
Joined: Mon Mar 31, 2003 8:59 am Posts: 1358 Location: right behind you
|
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.
|
Tue Sep 25, 2007 11:58 am |
|
|
Satis
Felix Rex
Joined: Fri Mar 28, 2003 6:01 pm Posts: 16653 Location: On a slope
|
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.
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.
_________________ They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.
|
Tue Sep 25, 2007 1:50 pm |
|
|
Pig
Duke
Joined: Mon Mar 31, 2003 8:59 am Posts: 1358 Location: right behind you
|
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.
|
Tue Sep 25, 2007 3:04 pm |
|
|
Satis
Felix Rex
Joined: Fri Mar 28, 2003 6:01 pm Posts: 16653 Location: On a slope
|
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
You do not have the required permissions to view the files attached to this post.
_________________ They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.
|
Thu Sep 27, 2007 7:57 am |
|
|
Pig
Duke
Joined: Mon Mar 31, 2003 8:59 am Posts: 1358 Location: right behind you
|
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.
|
Thu Sep 27, 2007 10:03 am |
|
|
RB
Emperor
Joined: Wed Apr 16, 2003 1:25 am Posts: 2560
|
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.
_________________ ++
|
Thu Sep 27, 2007 10:19 am |
|
|
Satis
Felix Rex
Joined: Fri Mar 28, 2003 6:01 pm Posts: 16653 Location: On a slope
|
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.
_________________ They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.
|
Thu Sep 27, 2007 2:21 pm |
|
|
Pig
Duke
Joined: Mon Mar 31, 2003 8:59 am Posts: 1358 Location: right behind you
|
Meh. Some things are so trivial they are not worth considering.
|
Thu Sep 27, 2007 3:18 pm |
|
|
RB
Emperor
Joined: Wed Apr 16, 2003 1:25 am Posts: 2560
|
Yeah, they're to be done without considering.
_________________ ++
|
Fri Sep 28, 2007 4:00 am |
|
|