473,766 Members | 2,172 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Progress bar fails in Firefox but works in IE

TJS
Can anyone see why the javascript below will not work in Firefox ?

=============== =============== =============== ========

<script runat = "server">
Private Sub Page_Load(sende r As Object, e As System.EventArg s)
' This really doesn't serve any purpose, other than to help with the
sample code.
' After 10 seconds, the page will stop loading and the progress bar will
disappear.
System.Threadin g.Thread.Sleep( 10000)
End Sub 'Page_Load
</script>

<div id='mydiv' >_</div>
<script language=javasc ript>document.g etElementById(' mydiv').innerTe xt =
'';</script>
<script language=javasc ript>;
var dots = 0;
var dotmax = 10;
function ShowWait(){
var output;
output = 'Loading';
dots++;
if(dots>=dotmax ){dots=1};
for(var x = 0;x < dots;x++){
output += '.'}
document.getEle mentById('mydiv ').innerText = output;
}
function StartShowWait() {
document.getEle mentById('mydiv ').style.visibi lity = 'visible';
window.setInter val('ShowWait() ',1000);
}
function HideWait(){
document.getEle mentById('mydiv ').style.visibi lity = 'hidden';
window.clearInt erval();
}
StartShowWait() ;
</script>

<body>
<form name="Form1" method="post" action="Progres sbar.aspx" id="Form1">
xxxxxxxxxxxx

<!-- All you form data goes here -->
</form>
<!-- Add this script block as the last element in your document. It will
hide the progress bar when the page loads -->
<script>
HideWait();
</script>
</body>
Jul 23 '05 #1
3 4400
TJS wrote:
Can anyone see why the javascript below will not work in Firefox ?

=============== =============== =============== ========

<script runat = "server">
Private Sub Page_Load(sende r As Object, e As System.EventArg s)
' This really doesn't serve any purpose, other than to help with the
sample code.
' After 10 seconds, the page will stop loading and the progress bar will
disappear.
System.Threadin g.Thread.Sleep( 10000)
End Sub 'Page_Load
</script>

<div id='mydiv' >_</div>
<script language=javasc ript>
<script type="text/javascript"> but that's not really your problem.
document.getEle mentById('mydiv ').innerText =


Gecko-based browsers have no -innerText- property, this code won't result in an
error (assuming everything else is right on the page, I didn't check everything
after seeing this), but all it will do in Gecko-based browsers is create a new
property called -innerText- on the element referred to the id 'mydiv'.

--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq

Jul 23 '05 #2
I seem to recall that the way Mozilla and Internet Explorer access style
elements is different. Sorry I don't have more than that, but try
focusing on the style "level" of the object hierarchy.

--
Scott Orsburn
Kaomso
www.kaomso.com

I'm not clever enough to think of a cool signature.
TJS wrote:
Can anyone see why the javascript below will not work in Firefox ?

============== =============== =============== =========

<script runat = "server">
Private Sub Page_Load(sende r As Object, e As System.EventArg s)
' This really doesn't serve any purpose, other than to help with the
sample code.
' After 10 seconds, the page will stop loading and the progress bar will
disappear.
System.Threadin g.Thread.Sleep( 10000)
End Sub 'Page_Load
</script>

<div id='mydiv' >_</div>
<script language=javasc ript>document.g etElementById(' mydiv').innerTe xt =
'';</script>
<script language=javasc ript>;
var dots = 0;
var dotmax = 10;
function ShowWait(){
var output;
output = 'Loading';
dots++;
if(dots>=dotmax ){dots=1};
for(var x = 0;x < dots;x++){
output += '.'}
document.getEle mentById('mydiv ').innerText = output;
}
function StartShowWait() {
document.getEle mentById('mydiv ').style.visibi lity = 'visible';
window.setInter val('ShowWait() ',1000);
}
function HideWait(){
document.getEle mentById('mydiv ').style.visibi lity = 'hidden';
window.clearInt erval();
}
StartShowWait() ;
</script>

<body>
<form name="Form1" method="post" action="Progres sbar.aspx" id="Form1">
xxxxxxxxxxxx

<!-- All you form data goes here -->
</form>
<!-- Add this script block as the last element in your document. It will
hide the progress bar when the page loads -->
<script>
HideWait();
</script>
</body>

Jul 23 '05 #3
TJS
thanks,

I changed it to innerHTML, now it works
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
2196
by: Martin Mrazek | last post by:
Hi, I check data validity in html form by JS. Something like for (i=0; i<document.form.elements.length; i++) { chechkValidity(i); } Unfortunately, the form has about two thousands elements (it is statistical questioning form for companies) and execution of this one cycle takes about twenty seconds.
14
24240
by: David Blickstein | last post by:
I have some XML documents that I want to open in a web browser and be automatically translated to HTML via XSLT. I'm using an xml-stylesheet processing command in a file called "girml.xml". This all works in Internet Explorer, but doesn't work with Firefox. In both IE and Firefox this works: <?xml-stylesheet type="text/xsl" encoding="UTF-8" href="makehtml.xslt" version="1.0"?>
0
8518
by: Anaam | last post by:
I have a page which is using html area and it is also uploading image files to be place in an HTML file on server side. im using ajax to send requests to server side. page works fine, image is place in target html File, as well as text from html area is also inserted to html file. but after call back from ajax firefox's status bar always show "waiting for 192.168.0.1 ... " where im and testing the page during development. also sometimes...
3
5703
by: gj | last post by:
Hey guys i created this object oriented javascript progress bar intended to be a plugin for server side scripts. http://www.silasco.net/progressdemo/test.html http://www.silasco.net/progressdemo/splash.html I am just wondering if it has any problems in your browsers....if you could just take a minute and try it and reply with your browser and version it would be greatly appreciated..
4
1682
by: sam | last post by:
Hi - I have an ASP page - that will be making about 7 calls to a database. What I want is to show progress to the users so that they can tell each database call is in progress. The asp calling page works fine, but it only displays when the entire process has been completed. What I want is to be able to show dynimically - step 1 done; step 2
28
2691
by: laredotornado | last post by:
Hi, Surprisingly, I can't get the drop down menus to work on PC IE 6. If you roll over "PRODUCTS", normally a drop down menu appears (on Safari and Firefox), but on PC IE, nada. http://test2.boxxtech.com/corporate/test.asp Any ideas? Thanks, - Dave
6
1816
by: tommy24 | last post by:
Here is the website: http://www.csie.ntu.edu.tw As you see, the bottom of the page is an iframe embedded. My problem is that the CSS of the webiste in iframe works fine in IE, but fails in firefox. My main purpose is to eliminate the underline of all links in iframe. Howerver, the results appear different from IE and Firefox. Could anyone tell me why? Any responses and suggestions will be helpful. Thank you in advance.
3
1763
by: Arodicus | last post by:
I have a static class method, MyObject.MySub.MyMethod(), which points to a handler in a Flash SWF (but I think that's inconsequential). In reality, the path is a lot longer, so I'd like to make a simpler way for other programmers to access that method, such as this: var MyFunc = MyObject.MySub.MyMethod So they could just call MyFunc() instead. This "proxy" or "shorthand" works great in IE, but fails in Firefox/Safari and sometimes even...
1
1392
by: Josip Habjan | last post by:
Hi, I developer ASP.NET File upload component with progress bar + it does not require page postback. I tested it and it works on my versions of IE6, IE7, Firefox, Mozila, Opera and Safari (for windows), but i would like to know how it works on your versions or other browsers. Test component is located here: http://blog.konkurencija.hr/ Waiting for comments...
0
9571
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10168
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9838
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8835
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.