By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,397 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

Number of CheckBoxes

P: n/a
Hi,

In my Jsp, I have a huge number of checkbox with the same name.
In IE 6.0, when I try to submit my form, I get a javascript "invalid
syntax" error in the submit call.

In Firefox this not happen.

And I can't change the name of the checkbox.

Thanks for any help,
Galli
Jul 23 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Galli wrote:
Hi,

In my Jsp, I have a huge number of checkbox with the same name.
In IE 6.0, when I try to submit my form, I get a javascript "invalid
syntax" error in the submit call.

In Firefox this not happen.

And I can't change the name of the checkbox.

Thanks for any help,
Galli


If you're submitting with method="GET", try changing it to "POST".

Otherwise, some more details (actually *any* details) might help....

Jul 23 '05 #2

P: n/a
Lee
Galli said:

Hi,

In my Jsp, I have a huge number of checkbox with the same name.
In IE 6.0, when I try to submit my form, I get a javascript "invalid
syntax" error in the submit call.


I've just tested with 10,000 checkboxes with no trouble in IE 6 or
Firefox. What's a "huge number"? What does your submit invocation
look like?

Jul 23 '05 #3

P: n/a
Lee wrote:
I've just tested with 10,000 checkboxes with no trouble in IE 6 or
Firefox. What's a "huge number"? What does your submit invocation
look like?


Did you check them all?

When IE's URL length limit is reached, it gives cryptic error messages.

If you have 10,000 checked controls, each with a value associated with it,
and your form method=get, you should surely get an error.

--
Matt Kruse
http://www.JavascriptToolbox.com
Jul 23 '05 #4

P: n/a
"Matt Kruse" <ne********@mattkruse.com> wrote in message news:<d2*********@news4.newsguy.com>...
Lee wrote:
I've just tested with 10,000 checkboxes with no trouble in IE 6 or
Firefox. What's a "huge number"? What does your submit invocation
look like?


Did you check them all?

When IE's URL length limit is reached, it gives cryptic error messages.

If you have 10,000 checked controls, each with a value associated with it,
and your form method=get, you should surely get an error.


Hi All,

Well, the huge number wasn't that "huge".
The form doesn't have the method definition and when I put the
method="POST" it worked fine.
So I think the default in IE is GET.

Thanks all for the help,
Galli
Jul 23 '05 #5

P: n/a


"Galli" <ga******@gmail.com> wrote in message
news:41*************************@posting.google.co m...
"Matt Kruse" <ne********@mattkruse.com> wrote in message
news:<d2*********@news4.newsguy.com>...
Lee wrote:
> I've just tested with 10,000 checkboxes with no trouble in IE 6 or
> Firefox. What's a "huge number"? What does your submit invocation
> look like?


Did you check them all?

When IE's URL length limit is reached, it gives cryptic error
messages.

If you have 10,000 checked controls, each with a value associated
with it,
and your form method=get, you should surely get an error.


Hi All,

Well, the huge number wasn't that "huge".
The form doesn't have the method definition and when I put the
method="POST" it worked fine.
So I think the default in IE is GET.


The default in all standards-conforming browsers is GET:

<url: http://www.w3.org/TR/REC-html40/inte...ms.html#h-17.3 />

The difference is that Gecko-based browsers don't appear to have trouble
with URLs tens of thousands of characters long whereas Internet Explorer
typically truncates the URL if it's greater than about 2000 characters,
and in really extreme cases, such as yours, produces an error.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #6

P: n/a
Grant Wagner wrote:
Internet Explorer typically truncates the URL if it's greater than
about 2000 characters, and in really extreme cases, such as yours,
produces an error.


Can you create a test case where the URL is truncated?

Any time the URL is too long for IE, I've always seen it generate a
ridiculous error message that confuses everyone.

--
Matt Kruse
http://www.JavascriptToolbox.com
Jul 23 '05 #7

P: n/a
"Matt Kruse" <ne********@mattkruse.com> wrote in message
news:d3********@news4.newsguy.com...
Grant Wagner wrote:
Internet Explorer typically truncates the URL if it's greater than
about 2000 characters, and in really extreme cases, such as yours,
produces an error.


Can you create a test case where the URL is truncated?

Any time the URL is too long for IE, I've always seen it generate a
ridiculous error message that confuses everyone.


It seems the behaviour has changed since the last time I tested this.
Under Internet Explorer 6.0.2900 on my server the following code works
in Internet Explorer, but the URL produced _appears_ to be:
http://{server_name} Even though the original page loaded from
http://{server_name}/dir1/dir2/longurl.htm and "X" is alerted.

<script type="text/javascript">
document.write(window.location.href.length);
var search = window.location.search;
if ('X' == search.charAt(search.length - 1))
{
alert(search.charAt(search.length - 1));
}

var s = (new Array(2023)).join('-');
s += 'X';
document.write(';' + s.length);
</script>
<form method="GET" action="longurl.htm">
<script type="text/javascript">
document.write('<input type="hidden" name="a" value="' + s + '">');
</script>
<input type="submit" value="Test">
</form>
<script type="text/javascript">
document.write('<a href="longurl.htm?ts=' + (new Date()).getTime() +
'">Reset</a>');
</script>

Other values around 2025 result in various URLs with strange unicode
characters on them, but "X" still alerts. Changing the value in new
Array() to something absurd like 10000 results in the form not
submitting at all.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #8

P: n/a
Galli wrote:
"Matt Kruse" <ne********@mattkruse.com> wrote [...]_
The form doesn't have the method definition and when I put the
method="POST" it worked fine.
So I think the default in IE is GET.


The default in all HTML 4+ UAs is `method="GET"', see the HTML 4.01
Specification.
PointedEars
--
Euer Ehren, zur Präventivexculpation meines Mandanten:
Bereits prior zum Zeitpunkt der Kopulation hatte er aufgrund
intensiver sexueller Stimulation durch sekundär attraktive Objekte
effektiv eine maximal divergente psycho-soziale Konstitution. ;-)
Jul 23 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.