Hi,
I think this is the best guide you can find on javascript (http://www-eleves-isia.cma.fr/documentation/Web/javascript/javascri/contents.htm) on the net. Because all this is surely 100% supported by any browser. For a more complete guide I suggest www.w3cschools.com.
But, now, your problem.
You have to set two event for the link, onmouseover and onmouseout.
<a href="#" onmouseover="some Js instruction" onmouseout="other Js instruction" >
Now, for open and close a window JS has two function:
window.open and window.close
<script>var mywin</script>
<a href="#" onmouseover="mywin=window.open('myurl','targetname','some option')" onmouseout="mywin.close()" >
You now have two problem:
- first, the popup killer. May be window.open can file because the user has a popup killer. You can't do anything to avoid this.
-second: window.close can ask to user EACH TIME if he want really close the window.
To avoid this second problem you can let the window open, but put it on back. To do this use focus() function:
<script>var mywin</script>
<a href="#" onmouseover="mywin=window.open('myurl','targetname','some option'); mywin.focus()" onmouseout="this.focus()" >
May be this last code is the best solution. Ah! Search in the guide for the cool option in window.open function...
Bye bye