| | |
Problem with window.open in Netscape7.2
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2005
Posts: 11
Reputation:
Solved Threads: 0
I have a code to open new window and display a progress bar .The code works fine in I.E and Netscape4.7 but in Netscape 7.2 it opens a new window and displays nothing in it . Below is my code. Can you please tell me what is wrong in my code.
HTML and CSS Syntax (Toggle Plain Text)
<html> <script> var Window02; var secondWindow = false; function ProgressBar(sLength) { var BarLength = 88; var iLength = parseFloat(sLength); var Bar = parseInt(iLength); var Trough = parseInt(BarLength - iLength); if (secondWindow == false) { var theWindow = 'width=700,height=60,left=10,top=20,menubar=0,toolbar=0,location=0,personalbar=0,status=0,scrollbars =0,directories=0,resizable=0'; Window02 = window.open('', 'Wind02', theWindow); } if (secondWindow == false) { Window02.document.write('<html><body><form name=f1>' + '<input type="text" size="' + Bar.toString() + '" style="background:blue">' + '<input type="text" size="' + Trough.toString() + '" style="background:green">' + 'Page is loading.' + '</form></body></html>'); secondWindow = true; Window02.document.close(); } if (secondWindow == true) { Window02.document.write('<html><body><form name=f1>' + '<input type="text" size="' + Bar.toString() + '" style="background:blue">' + '<input type="text" size="' + Trough.toString() + '" style="background:green">' + 'Page is loading.' + '</form></body></html>'); Window02.document.close(); } } function BarRun() { for(i=0;i<50;i++) { ProgressBar(i); BarDelay(1000); } Window02.close(); secondWindow = false; } function BarDelay(msec) { var enter_date = new Date(); var enter_time = enter_date.getTime(); var leave_date = new Date(); var leave_time = leave_date.getTime(); // a big integer while (enter_time + msec > leave_time) { leave_date = new Date(); leave_time = leave_date.getTime(); } } </script> <body> <form name=f1> <input type=button value=showProgressbar onClick=BarRun()> </form> </body> </html>
See http://www.pageresource.com/jscript/jwinopen.htm
I believe the line that might interest you is: 'remove any whitespace for netscape'.
I believe the line that might interest you is: 'remove any whitespace for netscape'.
you need to use Window02.document.open() before there is a valid document to write to in netscape and mozilla.
•
•
Join Date: Jul 2005
Posts: 11
Reputation:
Solved Threads: 0
Thanks for your reply.
I added Window02.document.open() before Window02.document.write
but it doesn't help. If i remove the Window02.close() then I see that after sometime it displays the last position of the progress bar in the window. I read somewhere that this could be a multithreading issue and javascript doenot support multithreading.
Is there any other way a progressbar can be displayed ,it neednot be in a popup window?
I added Window02.document.open() before Window02.document.write
but it doesn't help. If i remove the Window02.close() then I see that after sometime it displays the last position of the progress bar in the window. I read somewhere that this could be a multithreading issue and javascript doenot support multithreading.
Is there any other way a progressbar can be displayed ,it neednot be in a popup window?
![]() |
Similar Threads
- For King Ordis: "Critical System Error" alert (Viruses, Spyware and other Nasties)
- nView extensions in duplicates in right click menus (Windows NT / 2000 / XP)
- Only One IE window open at a time! (Web Browsers)
- IE 6 only allows 1 browser open at a time!! (Web Browsers)
- Can't open more than one window at a time (Windows NT / 2000 / XP)
Other Threads in the HTML and CSS Forum
- Previous Thread: Navigation Bar that extends the length of the page
- Next Thread: is it possible? help me
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
2002 appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity create css deleted design development displayimageinsteadofflash dreamweaver drupal emailmarketing epilepsy explorer firefox flash font fonts form format frontpage google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft missing mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. templates textcolor theme timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 wordpress xml xsl





