mjbarfoot
04-24-2003, 08:34 AM
Hi,
I'm having some difficulty referencing Anchor elements in my script.
From a mouseover event on a image I want to change the text style of a link from text-decoration:none to text-decoration:underline.
I presumed I would be able to something like this.
<a href="#" onMouseOver="mylink.style.text-decoration:underline"...
<a ID="mylink" style="text-decoration:none"...>test</a>
You get the general idea...anyway whatever I try I just get the usual "object expected" message. I'm not sure why the first link cannot refer to the second. I have tried using a full declaration something like. document.body.mylink... but this does not work either.
Guess I'm missing something fairly crucial here. Any ideas??
Thanks in advance,
Matt
I'm having some difficulty referencing Anchor elements in my script.
From a mouseover event on a image I want to change the text style of a link from text-decoration:none to text-decoration:underline.
I presumed I would be able to something like this.
<a href="#" onMouseOver="mylink.style.text-decoration:underline"...
<a ID="mylink" style="text-decoration:none"...>test</a>
You get the general idea...anyway whatever I try I just get the usual "object expected" message. I'm not sure why the first link cannot refer to the second. I have tried using a full declaration something like. document.body.mylink... but this does not work either.
Guess I'm missing something fairly crucial here. Any ideas??
Thanks in advance,
Matt