[thelist] Only IE-pc doesn't want to send form?

Roger Ly evolt at matchpenalty.com
Tue Feb 14 13:33:22 CST 2006


>Weird behavior of IE-PC, which doesn't send the "ORDER" form, while  
>all other browsers on PC and Mac do indeed IFAIK.

It looks like the amount of data you are sending via GET is too long for my
Win2K/IE6.0.2800.1106.

I started to play around with your form, removing items, etc, and found that
if I removed enough things, it would submit fine.  Otherwise, it wouldn't
even attempt to submit the form.  (form.onsubmit was being fired, but IE
wouldn't attempt to process the URL.)

After playing around with things, it looks like the final URL which IE is
being told to go to is just too long.  I played around with things a little
and it looks like your full URL is over 2000 characters when submitted (with
no data!).  Some unconfirmed playing around seems to indicate that IE won't
attempt to process the URL if it is generated to be longer than 2101
characters.

Here is the test I did:
		function mySubmit()
		{
			var myForm = document.forms[0]
			var output = '';
			for (i = 0; i < myForm.elements.length; i++)
			{
				if (output != '')
				{
					output += '&';
				}
				output += escape(myForm.elements[i].name) +
'=';
				output += escape(myForm.elements[i].value);
			}
			output = myForm.action + '?' + output;
			alert(output.length);
		}

Basically, took the action of the form, appended ? and a bunch of escaped
name/value pairs.  This is under the assumption that the javascript escape
is similar to the mechanism that IE uses to create the GET URL after
processing each form element.

On another note:  If I take the result of the function that I wrote and
paste that URL into IE's address bar, even more of it gets cropped.  It
looks like a 2102 character URL is too long for IE by around 55 characters,
making it look like IE's max URL is closer to 2046 (which is close to 2048,
so it sounds reasonable).

Basically, you'll need to swap out your form action from a GET to a POST, or
significantly shrink the size of your form.  Keep note that even getting the
input fields below a certain threshold may not help you with GETs since a
user can type a ton of data in any of the form fields.

HTH,

Roger





More information about the thelist mailing list