473,396 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

JavaScript code not working in firefox: "length parameter can't be less than zero" error

hi there,

im also having problem regarding javascript in fire fox here is my cod ewhich im callin g from server side
it works fine in IE
but fails in FIREFOX

Expand|Select|Wrap|Line Numbers
  1. public static void PrintProgressBar()
  2.     {
  3.         StringBuilder sb = new StringBuilder();
  4.  
  5.  
  6.         sb.Append("<div id='updiv' style='Font-weight:bold;font-size:11pt;Left:320px;COLOR:black;font-family:verdana;Position:absolute;Top:140px;Text-Align:center;'>&nbsp;</div>");
  7.         sb.Append("<script language='javascript' type='text/javascript'> var up_div=document.getElementById('updiv');up_div.innerText='';</script>");
  8.         sb.Append("<script language='javascript' type='text/javascript'>");
  9.         sb.Append("var dts=0; var dtmax=10;");
  10.         sb.Append("function ShowWait()");
  11.         sb.Append("{");
  12.             sb.Append("var output;");
  13.             sb.Append("output='Please wait while uploading!!!';");
  14.             sb.Append("dts++;");
  15.             sb.Append("if(dts>=dtmax)");
  16.                 sb.Append("dts=1;");
  17.             sb.Append("for(var x=0;x < dts; x++)");
  18.             sb.Append("{");
  19.                 sb.Append("output+='σ';");
  20.             sb.Append("}");
  21.             sb.Append("up_div.innerText=output;");
  22.             sb.Append("up_div.style.color='red';");
  23.         sb.Append("}");
  24.         sb.Append("function StartShowWait()");
  25.         sb.Append("{");
  26.             sb.Append("up_div.style.visibility='visible';");
  27.             sb.Append("ShowWait();");
  28.             sb.Append("window.setInterval('ShowWait()',200);");
  29.         sb.Append("}");
  30.         sb.Append("StartShowWait();");
  31.         sb.Append("</script>");
  32.  
  33.  
  34.         HttpContext.Current.Response.Write(sb.ToString());
  35.         HttpContext.Current.Response.Flush();
  36.     }
i call this on the button click event
it shows a progress bar in IE
but not in FireFOx
In FF it give error message

LENGTH PARAMETER CANT BE LESS THAN ZERO: PARAMETER LENGTH

Please post back a reply soon

Its urgent
Thanx in advance
Oct 23 '08 #1
1 3004
acoder
16,027 Expert Mod 8TB
Hi

I've split your post from the thread you posted in since it's a different problem.

Please post your code in code tags. See How to Ask a Question. Thanks.

Repost your code showing JavaScript client-side code, not JSP code. You can do that by viewing the source in your browser.
Oct 23 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

119
by: rhat | last post by:
I heard that beta 2 now makes ASP.NET xhtml compliant. Can anyone shed some light on what this will change and it will break stuff as converting HTML to XHTML pages DO break things. see,...
3
by: Jimski | last post by:
Hello all, I am having a problem where I get an error message when I call FlushFinalBlock when decrypting my encrypted text. I am using the Rijndael algorithm. The error message is "Length...
4
by: Ondrej Spanel | last post by:
The code below does not compile with .NET 2003, I get folowing error: w:\c\Pokusy\delegTemplArg\delegTemplArg.cpp(11) : error C2993: 'float' : illegal type for non-type template parameter 'x' ...
5
by: Dominiek | last post by:
Hi, I have a strange problem. during the developement of my program, while progressively writing more and more code, the callstack of my program gets deeper and deeper (7 levels). Then, all...
2
by: Tom | last post by:
I'm getting this error when I try to pass a structure to a dll. An unhandled exception of type 'System.ArgumentException' occured in Test1.exe Additional Information: Type could not be marshaled...
4
by: jackchang1 | last post by:
It took me a while to figure out this error functiom method1(){ alert(); } by this error message missing ; before statement functiom method1(){ alert(); } why Javascript can't tell me...
4
by: Steve Richter | last post by:
I have a C++ forms project that I am adding some unmanaged code to. I have a member function of the Form1 class that returns a String^ holding the text of the last win32 error. The code is...
10
by: akirekab | last post by:
I am running a report in Access. When I click to run report, a dialog comes up for missing parameter, showing just the name of a table in the box. Now if I just click ok without typing anything...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.