Closed
Bug 110288
Opened 23 years ago
Closed 23 years ago
JavaScript script doesn't work
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: darkshadow, Assigned: rogerl)
Details
Attachments
(2 files)
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.5+) Gecko/20011108 BuildID: 2001110808 A friend of me showed me, that the following page simply shows _nothing_ using Mozilla and NS 6: <html> <head> <title>Willkommen auf meinem Webserver!</title> <script language="javascript"> var url= window.location.href; if(url.charAt(url.length- 1)== '/') { url= url.substring(0, url.length- 1); } url= url+ '/'; var s= url.indexOf("//")+ 2; var e= url.indexOf("@"); if(e > 0) { var atpart= url.substring(s, e); window.location.href= url+ atpart; } </script> <script language="JavaScript1.2"> nn = 04; nd = 10; nh = 19; nm = 10; ns = 49; r = 0; if (nn == 03) { r = 1036800 + (31-nd)*86400; } else if(nn == 04) { r = (12-nd)*86400; } r+=(24-nh)*3600 + (60-nm)*60 + ns; function res() { if(document.all) { launch.innerHTML = r; r--; setTimeout('res()',1000) } else if(document.layers) { document.write("<a>" + r + "</a>") } } var sliderwidth=500 var sliderheight=100 var slidespeed=3 var leftrightslide=new Array() var finalslide='' leftrightslide[0]='<a href=http://www.rambler.ru/><img src="/images/1.jpg" border=0></a>' leftrightslide[1]='<a href=http://www.google.com/><img src="/images/2.jpg" border=0></a>' leftrightslide[2]='<a href=http://www.yahoo.de/><img src="/images/3.jpg" border=0></a>' leftrightslide[3]='<a href=http://www.yahoo.de/><img src="/images/4.jpg" border=0></a>' leftrightslide[4]='<a href=http://www.yahoo.de/><img src="/images/5.jpg" border=0></a>' var copyspeed=slidespeed for (i=0;i<leftrightslide.length;i++) finalslide=finalslide+leftrightslide[i]+"" function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers){ document.ns_slider01.visibility="show" setTimeout("window.onresize=regenerate",450) intializeleftrightslide()} if (document.all) ieslider.scrollAmount=slidespeed } function intializeleftrightslide(){ document.ns_slider01.document.ns_slider02.document.write('<nobr>'+finalslide+'</nobr>') document. ns_slider01.document.ns_slider02.document.close() thelength=document.ns_slider01.document.ns_slider02.document.width scrollslide()} function scrollslide(){ if (document.ns_slider01.document.ns_slider02.left>=thelength*(-1)){ document.ns_slider01.document.ns_slider02.left-=slidespeed setTimeout("scrollslide()",100) } else{ document.ns_slider01.document.ns_slider02.left=sliderwidth scrollslide() } } window.onload=regenerate2 </script> <script LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- if(window.event + "" == "undefined") event = null; function HM_f_PopUp(){return false}; function HM_f_PopDown(){return false}; popUp = HM_f_PopUp; popDown = HM_f_PopDown; //--> </SCRIPT> <script LANGUAGE="JavaScript1.2" TYPE="text/javascript"> <!-- HM_PG_MenuWidth = 150; HM_PG_FontFamily = "Arial,sans-serif"; HM_PG_FontSize = 10; HM_PG_FontBold = 0; HM_PG_FontItalic = 0; HM_PG_FontColor = "blue"; HM_PG_FontColorOver = "white"; HM_PG_BGColor = "#DDDDDD"; HM_PG_BGColorOver = "#FFCCCC"; HM_PG_ItemPadding = 5; HM_PG_KeepHilite = true; HM_PG_ClickStart = 1; HM_PG_ClickKill = false; HM_PG_ChildOverlap = 0; HM_PG_ChildOffset = 10; HM_PG_ChildPerCentOver = null; HM_PG_TopSecondsVisible = .5; HM_PG_StatusDisplayBuild =1; HM_PG_StatusDisplayLink = 0; HM_PG_UponDisplay = null; HM_PG_UponHide = null; HM_PG_RightToLeft = false; //HM_a_TreesToBuild = [1,2]; //--> </SCRIPT> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="expires" content="0"> <noscript> <meta http-equiv="expires" content="0"> <meta http-equiv="refresh" content="0; URL=./nojs.html"> </noscript> <script LANGUAGE="JavaScript"> <!-- This script and many more are available free online at --> <!-- JavaGavin http://www.javagavin.com --> <!-- Begin function showtip2(current,e,text){ if (document.all&&document.readyState=="complete"){ document.all.tooltip2.innerHTML='<marquee style="border:1px solid black">'+text+'</marquee>' document.all.tooltip2.style.pixelLeft=event.clientX+document.body.scrollLeft-150 document.all.tooltip2.style.pixelTop=event.clientY+document.body.scrollTop+10 document.all.tooltip2.style.visibility="visible" } else if (document.layers){ document.tooltip2.document.nstip.document.write('<b>'+text+'</b>') document.tooltip2.document.nstip.document.close() document.tooltip2.document.nstip.left=0 currentscroll=setInterval("scrolltip()",100) document.tooltip2.left=e.pageX-150 document.tooltip2.top=e.pageY+10 document.tooltip2.visibility="show" } } function hidetip2(){ if (document.all) document.all.tooltip2.style.visibility="hidden" else if (document.layers){ clearInterval(currentscroll) document.tooltip2.visibility="hidden" } } // End --> </script> </head> <body background="pic/back.gif" bgcolor="#000000" text="white" link="yellow" vlink="yellow"> <!-- for Tooltip --> <div id="tooltip2" style="position:absolute;visibility:hidden;clip:rect(0 150 50 0);width:150px;background-color:yellow;color:black;z-index:10"></div> <div align="left"><script LANGUAGE="JavaScript1.2" SRC="HM_Loader.js" TYPE='text/javascript'></SCRIPT></div> <div align=right> <table width="100%" border="0"> <tr><td><img src="pic/dot_clear.gif" width=1 height=50></td></tr> <tr> <td> <div align="CENTER" name="divTest" onMouseover="showtip2(this,event,'Willkommen auf der Seite mit der niedrigsten Hitrate im Internet!');" onMouseout="hidetip2();" > <table border="0"> <tr> <td align="center"> <font size="6">Willkommen<br> auf der Seite mit<br> der niedrigsten Hitrate<br> im Internet!</font> </td> </tr> </table> </div> <table align="right" border="0"> <tr> <td><font size="3">Wenn Sie das lesen, muß Ihnen wirklich langweilig sein.</font></td> <td> <div align="CENTER" name="divTest" onMouseover="showtip2(this,event,'Hallo.......Danke, daß Sie sich meine Webseiten anschauen...! Ich entschuldige mich im Voraus für die vielen unnützen Spielereien und den geringen Inhalt aber das ist nun mal ein kleines Hobby von mir!');" onMouseout="hidetip2();" > <img align=right src="ich.jpg"> </div> </td> </tr> </table> </td> </tr> <script> if(top.frames.length > 0) document.writeln ('<tr><td><div align="center"><font size="4" color="red">'+ 'Diese großartige Website wird derzeit unwürdigerweise in einem Frame angezeigt. Klicken Sie <a href="javascript:top.location.href=self.location">hier</a>, um sie das Frameset ersetzen zu lassen oder <a href="javascript:var fenster = window.open(self.location)">hier</a>, um sie in einem neuen Fenster zu öffnen.</font></div></td></tr>'); </script> <tr> <td> <table align="center" border="0"> <tr> <td> <script> if (document.all){ document.write('<marquee id="ieslider" scrollAmount=0 style="width:'+sliderwidth+'">'+finalslide+'</marquee>') ieslider.onmouseover=new Function("ieslider.scrollAmount=0") ieslider.onmouseout=new Function("if (document.readyState=='complete') ieslider.scrollAmount=slidespeed") } </script> <ilayer width=&{sliderwidth}; height=&{sliderheight}; name="ns_slider01" visibility=hide> <layer name="ns_slider02" onMouseOver="slidespeed=0;" onMouseOut="slidespeed=copyspeed"></layer> </ilayer> </td> </tr> </table> </td> </tr> </table> <div align="right"><a href="mailto:webmaster@Michael-Nuhn.de"><font size="-1">Webmaster</font></a></div> </body> </html> Reproducible: Always Steps to Reproduce: 1. save the code as index.html 2. open index.html in Mozilla Actual Results: nothing :-((( Expected Results: An alert window with browser information
Reporter | ||
Comment 1•23 years ago
|
||
Damned, added wrong code, sorry.... Here's the correct one: <HEAD> <script language='JavaScript1.2'> <!-- if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4) IE = true; else IE = false; if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4) MOZZ = true; else MOZZ = false; if (MOZZ) { if(navigator.language.indexOf("en")>-1) document.write("english language browser (this function only works with Netscape)"); if(navigator.language.indexOf("de")>-1) document.write("Deutschsprachiger Browser installiert (geht nur mit Netscape)"); } // \t=tab klappt nur im Internet Explorer alert('Netscape\t\t ' + MOZZ + '\nIExplorer\t\t ' + IE + '\n' + '\nGeneration\t ' + parseInt(navigator.appVersion) + '\nUserAgent\t ' + navigator.userAgent + '\nCodename\t ' + navigator.appCodeName + '\nCookies\t\t ' + navigator.cookieEnabled + '\nJava\t\t ' + navigator.javaEnabled() + '\nJavaScript\t true' + '\nPlattform\t\t ' + navigator.platform ); //--> </SCRIPT> </HEAD> <BODY> <NOSCRIPT> Die Abfrage erfolgt über JavaScript - also bitte.... </NOSCRIPT> </BODY>
Comment 2•23 years ago
|
||
Comment 3•23 years ago
|
||
Page works just fine for me. Check the attachment.
Comment 4•23 years ago
|
||
In browser: "english language browser (this function only works with Netscape)"
Comment 5•23 years ago
|
||
The attached image shows the pop-up window displayed when I clicked on the first attachment. Build ID: 2001 11 14 03. Window 2000.
Comment 6•23 years ago
|
||
Boris: thanks! Sven's screenshot is also what I see; this is what the the attachment is supposed to do. Using binaries 20011111xx Linux, 20011113xx WinNT, 20011115xx Mac9.1. Marking WORKSFORME + VERIFIED based on our findings. Sven: it's often better to file a bug first, then provide your example afterwards via the "Create a New Attachment" link above. When examples are pasted in-line, Bugzilla adds unwanted linefeeds that can cause syntax errors in the JavaScript if the lines are very long. If for some reason you provided the wrong example, you can reopen this bug and attach the correct one. If we have misunderstood your report, you can reopen and explain what we're missing. Thank you -
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Reporter | ||
Comment 8•23 years ago
|
||
OK, if I try it now it is working... why ever... I think, you can close this bug.
Comment 9•23 years ago
|
||
No problem - this bug will remain "Verified Worksforme" until the Bugzilla administrators actually mark it "Closed". Of course, if the problem comes back, you can reopen it - thanks.
You need to log in
before you can comment on or make changes to this bug.
Description
•