I get it now, here is what I did:
Code:
<form name="form1">
<a href="http://www.javascriptkit.com" onmouseover="displaydesc(0, thetext1, 'textcontainer1');return true;">JavaScript Kit </a>
<a href="http://freewarejava.com" onmouseover="displaydesc(1, thetext1, 'textcontainer1');return true;">Freewarejava.com</a>
<a href="http://wired.com" target="newwin" onmouseover="displaydesc(2, thetext1, 'textcontainer1');return true;">Wired News</a>
<a href="http://www.news.com" onmouseover="displaydesc(3, thetext1, 'textcontainer1');return true;">News.com</a>
<a href="http://www.codingforums.com" target="newwin" onmouseover="displaydesc(4, thetext1, 'textcontainer1');return true;">Coding Forums</a>
<br>
<span id="textcontainer1" align="left" style="font:italic 13px Arial">Hi
</span>
</form>
From what you say, you would probably want to change 'onmouseover' to 'onclick'. There are a few other changes, change the displaydesc function to this (change in red):
Code:
function displaydesc(which, descriptionarray, container){
if (document.getElementById)
document.getElementById(container).innerHTML=descriptionarray[which]
}
And, at the bottom of the script where it had:
Code:
displaydesc(document.form1.select1, thetext1, 'textcontainer1')
Do this:
Code:
displaydesc(0, thetext1, 'textcontainer1')
Bookmarks