Closed Thread Icon

Preserved Topic: doesn't work in IE (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=9048" title="Pages that link to Preserved Topic: doesn&amp;#039;t work in IE (Page 1 of 1)" rel="nofollow" >Preserved Topic: doesn&#039;t work in IE <span class="small">(Page 1 of 1)</span>\

 
nepdude
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Mar 2004

posted posted 03-24-2004 16:30

Please help me out. This code works fine in Netscape 7, but not in IE 6. IE says "Object doesn't support this property or method" for the three lines in bold.

(head)
(script language="javascript")
function mover(aaa){
if(aaa == "one") desc = "Description one"
if(aaa == "two") desc = "Description two"
if(aaa == "three") desc = "Description three"

document.getElementById("desc").innerHTML = desc
}
function mout(){
document.getElementById("desc").innerHTML = "Move mouse over links for description"
}
(/script)(/head)

(body)

(div id="desc" style="border:1px solid black;height:120px;width:280px;padding:6px")Move mouse over links for description(/div)

(ol)
(li)(a href="one.asp" onmouseover='mover("one")' onmouseout='mout()')One(/a)(/li)
(li)(a href="two.asp" onmouseover='mover("two")' onmouseout='mout()')Two(/a)(/li)
(li)(a href= "three.asp" onmouseover='mover("three")' onmouseout='mout()')Three(/a)(/li)
(/ol)

(/body)

Appreciate any help.

[This message has been edited by nepdude (edited 03-24-2004).]

MajorFracas
Nervous Wreck (II) Inmate

From:
Insane since: Jul 2003

posted posted 03-24-2004 17:11

I haven't tested your code, but I am wondering if there is some kind of name clash going on with the variable "desc". Since you are using it as a string inside the function, but it is also the id of an element in the body...

Try renaming the local variable desc in mover() to something else.

MajorFracas
Nervous Wreck (II) Inmate

From:
Insane since: Jul 2003

posted posted 03-24-2004 17:19

Yep. That's it. I just tested it by renaming 'desc' to 'descStr' and it works in IE6...

nepdude
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Mar 2004

posted posted 03-24-2004 17:42

Thanx a lot MajorFracas. You nailed it.

« BackwardsOnwards »

Show Forum Drop Down Menu