473,321 Members | 1,748 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,321 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 3003
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.