469,916 Members | 2,263 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,916 developers. It's quick & easy.

maxium length of parametes?

<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?
Jul 23 '05 #1
2 1060
In article <fc**************************@posting.google.com >,
dd*****@netscape.net (David j) wrote:
<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?


It's that the size of the alert's output is limited (I think). Try a
document.write instead.

Robert
Jul 23 '05 #2
David j wrote:
<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?


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 <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_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-deve...upgrade_2.html
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Mitchua | last post: by
14 posts views Thread by Luiz Antonio Gomes Pican?o | last post: by
4 posts views Thread by moondaddy | last post: by
4 posts views Thread by randomtalk | last post: by
6 posts views Thread by finerrecliner | last post: by
14 posts views Thread by Richard Maher | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.