maxium length of parametes?

D

David j

<script>
function test(str) {
alert(str)
}
</script>

The JavaScript function listed above takes a string as a parameter.
If the string is <=2055 characters it works as expected. Anything
=2056 characters and it doesn't work. The alert box is never
displayed.

In IE 6 is doesn't work, mozilla 1.6 it works fine.

Any ideas why this isn't working in IE? Is there a limit to the
lenght of string in IE?
 
G

Grant Wagner

David said:
<script>
function test(str) {
alert(str)
}
</script>

The JavaScript function listed above takes a string as a parameter.
If the string is <=2055 characters it works as expected. Anything
displayed.

In IE 6 is doesn't work, mozilla 1.6 it works fine.

Any ideas why this isn't working in IE? Is there a limit to the
lenght of string in IE?

Works fine in IE6 SP1 here:

<script>
function test(str) {
alert(str)
}

test((new Array(9999)).join("x"));
</script>

Are you sure the problem isn't with what you're passing to test()?

--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top