[thelist] JavaScript chunk: Internet Explorer 5.5 versus Opera 6, Netscape Navigator 4.77

Syed Zeeshan Haider zeeshan_paki at yahoo.com
Wed Mar 6 16:50:00 CST 2002


Hello Experts,
I have a part of JS which does not work well with Opera 6 and Netscape
Navigator 4.77 and 4.79. I have asked this question earlier with
slightly different subject, but I got no response, therefore, I am
asking again.
Here are the details of my question:
Opera does not give any error but JS does not work as it should be (or
as it works in IE 5.5). Netscape Navigator 4.77 and 4.79 do give errors.
Here I copy that part of JS which is not working in Opera 6 and Netscape
Navigator 4.77 and 4.79:

if(cSide=="")
 {
 alert("Please choose a coin side.")
 return false
 }
if(k!=1)
 {
 k++
 imgNumb=Math.random()
 imgNumb=imgNumb*2
 imgNumb=Math.floor(imgNumb)
 rut.style.visibility="visible"
 document.images.tossresult.src=image[imgNumb]
// image is an array and imgNumb is a variable. Its value is 0 or 1
 document.images.tossresult.alt=alter[imgNumb]
// alter is also an array
 }
 else
 {
 if(navigator.appName.indexOf("Netscape")!=-1)
  {
  alert("Toss has been done once.\nPlease RELOAD this page for repeating
the process of toss.")
  }
 else
  {
  alert("Toss has been done once.\nPlease REFRESH this page for
repeating the process of toss.")
  }
 }

This JS is a part of a function, which is invoked by onClick event of a
button. It must replace a single pixeled spacer image with a large image
of a coin. But it is not doing that way. In NN 4.77 and NN 4.79 an error
occurs saying "rut is not defined". rut is id of a div tag.
Thank you,
Syed Zeeshan Haider.
http://syedzeeshanhaider.faithweb.com/


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the thelist mailing list