in my web page java scripts are not working in firefox but working in internet explor, website name is http://www.truemuslims.net/index.html open it in ie and also open it in mozila u can see the differance, 3 java script r working behand this page
i m proving u the java scripts haere plz read...
<SCRIPT language=text/JavaScript> if ((navigator.appName.indexOf('Microsoft')+1)) { document.write('<style type="text/css"> .opacity1 {filter:alpha(opacity=75)} .opacity2 {filter:alpha(opacity=100)} </style>'); } if ((navigator.appName.indexOf('Netscape')+1)) { document.write('<style type="text/css"> .opacity1 {-moz-opacity:0.5} .opacity2 {-moz-opacity:1} </style>'); } else { document.write(); } </SCRIPT>
<SCRIPT language=text/JavaScript>
</SCRIPT>
<SCRIPT LANGUAGE="text/JavaScript1.1">
</script> <SCRIPT TYPE="text/javascript"> working at IE & Mozilla </SCRIPT> <script type="text/javascript">
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-16426871-1']); _gaq.push(['_trackPageview']);
(function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();
</script>
<SCRIPT>
var brOK=false; var mie=false; var rank; var vmin=2; var vmax=5; var vr=2; var timer1;
if(parseInt(navigator.appVersion.charAt(0))>=4)
{brOK=true;}
if(navigator.appName.indexOf("Microsoft")!=-1)
{mie=true; }
function Pooh(poohname,width,height)
{this.named=poohname;
this.vx=vmin+vmax*Math.random(); this.vy=vmin+vmax*Math.random(); this.w=width; this.h=height; this.xx=0; this.yy=0; this.timer1=null;
}
function movepooh(poohname)
{
if(brOK) {eval("pooh="+poohname); if(!mie) {pageX=window.pageXOffset; pageW=window.innerWidth; pageY=window.pageYOffset; pageH=window.innerHeight; } else {pageX=window.document.body.scrollLeft; pageW=window.document.body.offsetWidth; pageY=window.document.body.scrollTop; pageH=window.document.body.offsetHeight; }
pooh.xx=pooh.xx+pooh.vx; pooh.yy=pooh.yy+pooh.vy;
pooh.vx+=vr*(Math.random()-0.5); pooh.vy+=vr*(Math.random()-0.5); if(pooh.vx>(vmax+vmin)) pooh.vx=(vmax+vmin)*2-pooh.vx; if(pooh.vx<(-vmax-vmin)) pooh.vx=(-vmax-vmin)*2-pooh.vx; if(pooh.vy>(vmax+vmin)) pooh.vy=(vmax+vmin)*2-pooh.vy; if(pooh.vy<(-vmax-vmin)) pooh.vy=(-vmax-vmin)*2-pooh.vy;
if(pooh.xx<=pageX) {pooh.xx=pageX; pooh.vx=vmin+vmax*Math.random(); } if(pooh.xx>=pageX+pageW-pooh.w) {pooh.xx=pageX+pageW-pooh.w; pooh.vx=-vmin-vmax*Math.random(); } if(pooh.yy<=pageY) {pooh.yy=pageY; pooh.vy=vmin+vmax*Math.random(); } if(pooh.yy>=pageY+pageH-pooh.h) {pooh.yy=pageY+pageH-pooh.h; pooh.vy=-vmin-vmax*Math.random(); }
if(!mie) {eval('document.'+pooh.named+'.top ='+pooh.yy); eval('document.'+pooh.named+'.left='+pooh.xx); } else {eval('document.all.'+pooh.named+'.style.pixelLeft='+pooh.xx); eval('document.all.'+pooh.named+'.style.pixelTop ='+pooh.yy); } pooh.timer1=setTimeout("movepooh('"+pooh.named+"')",100); }
}
function stopme(poohname)
{if(brOK)
{eval("pooh="+poohname); if(pooh) {if(pooh.timer1!=null) {clearTimeout(pooh.timer1);} } if(tid!=null) clearTimeout(tid); }
}
function pagestart() {rank=new Pooh("rank",60,80);
if(brOK) { movepooh("rank"); }
} </script>
All Replies (6)
Does that only happen in the 4.0 beta version or in the current 3.6.12 release as well?
I'm on Linux, so can't test it in IE.
I did notice an error in the Tools > Error Console.
Error: document.rank is undefined Source File: http://www.truemuslims.net/index.html Line: 205
if(!mie) {eval('document.'+pooh.named+'.top ='+pooh.yy); eval('document.'+pooh.named+'.left='+pooh.xx); }
You can try to use document.getElementById() instead.
https://developer.mozilla.org/en/DOM/document.getElementById
Another good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.
this is happening in all mozila versions, and i cant see any kind of error in line 205, when i browse this page in mozila.
u can see the snap shot of website after browsing in mozila.
thx
Do you see the Flash object in that window?
Start Firefox in Use Troubleshoot Mode in Firefox to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
- Don't make any changes on the Safe mode start window.
See Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems and Troubleshoot issues with plugins like Flash or Java to fix common Firefox problems
See also http://kb.mozillazine.org/Plugin-container_and_out-of-process_plugins
i m answering in new poast
Modified
i have change the script but still not working, 2 scripts are not worrking in mozila, scripts are.
1-its moving picture script accrose the page working in I.E but not working in any version og mozila.
<SCRIPT LANGUAGE="JavaScript"> </SCRIPT>
<a href="features.html">
</a>
2-this is text revolving script around the cursor, working in I.E not working in Mozila.
<SCRIPT LANGUAGE="JavaScript"> </SCRIPT>
if some one have any solution plz let me know. webguru12@gmail.com
i have paste two java scripts in my last post but i dont know why it is not showing