Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript conversion

Status
Not open for further replies.

Omicron

Technical User
Jul 15, 2001
32
US
I know virtually nothing about javascript coding but I am trying to convert some code to run under Netscape 6.2
I've manged to figure out how to sniff for NS6 (N6=document.getElementById)

but beyond that I'm lost. Here are several lines of code I need to have made compatible with NS6. Can anyone show me what the heck to do?

if (IE) {document.write('<DIV ID=&quot;ssm2&quot; style=&quot;visibility:hidden;Position : Absolute ;Left : 0px ;Top : '+YOffset+'px ;Z-Index : 20;width:1px&quot; onmouseover=&quot;moveOut()&quot; onmouseout=&quot;moveBack()&quot;>')}

if (NS) {document.write('<LAYER visibility=&quot;hide&quot; top=&quot;'+YOffset+'&quot; name=&quot;ssm2&quot; bgcolor=&quot;'+menuBGColor+'&quot; left=&quot;0&quot; onmouseover=&quot;moveOut()&quot; onmouseout=&quot;moveBack()&quot;>')}

if (N6) ???????????????????? - lost

Here is another:

if ((IE && ssm2.style.pixelLeft<0)||(NS && document.ssm2.left<0)) {
if (IE) {ssm2.style.pixelLeft += (5%menuWidth);
}
if (NS) {
document.ssm2.left += (5%menuWidth);
}

Out of my league.
Any and all help would be most appreciated.
Thank you.
- Omicron -
Compuset Portal
 
1. i guess it wuld be the same as for ie (at least i have Netscape 6.1 & it works there)

2. you told you figured that out..
document.getElementById('ssm2').offsetLeft Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top