It is currently Thu Mar 28, 2024 2:29 pm



Reply to topic  [ 10 posts ] 
IE6 & IE7 form submission gotcha 
Author Message
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16646
Location: On a slope
Reply with quote
Post 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.

_________________
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
Profile WWW
Duke
User avatar

Joined: Mon Mar 31, 2003 8:59 am
Posts: 1358
Location: right behind you
Reply with quote
Post 
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
Profile YIM WWW
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16646
Location: On a slope
Reply with quote
Post 
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.

_________________
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
Profile WWW
Duke
User avatar

Joined: Mon Mar 31, 2003 8:59 am
Posts: 1358
Location: right behind you
Reply with quote
Post 
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
Profile YIM WWW
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16646
Location: On a slope
Reply with quote
Post 
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
Profile WWW
Duke
User avatar

Joined: Mon Mar 31, 2003 8:59 am
Posts: 1358
Location: right behind you
Reply with quote
Post 
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
Profile YIM WWW
Emperor
User avatar

Joined: Wed Apr 16, 2003 1:25 am
Posts: 2560
Reply with quote
Post 
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
Profile WWW
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16646
Location: On a slope
Reply with quote
Post 
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
Profile WWW
Duke
User avatar

Joined: Mon Mar 31, 2003 8:59 am
Posts: 1358
Location: right behind you
Reply with quote
Post 
Meh. Some things are so trivial they are not worth considering.


Thu Sep 27, 2007 3:18 pm
Profile YIM WWW
Emperor
User avatar

Joined: Wed Apr 16, 2003 1:25 am
Posts: 2560
Reply with quote
Post 
Yeah, they're to be done without considering. :P

_________________
++


Fri Sep 28, 2007 4:00 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.