|
Q194 How can I adapt the previous script so that a window opens and closes on onMouseOver and onMouseOut?
irt.org | Knowledge Base | JavaScript | Window | Q194 [ previous next ]
Q194 How can I adapt the previous script so that a window opens and closes on onMouseOver and onMouseOut?
<HTML>
<HEAD>
<STYLE><!--
#style1 { color: orange; text-decoration: none }
//--></STYLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript"><!--
function myvoid() {}
var popup = '';
function showpopup(message) {
msgWindow=window.open('','windowname','width=200,height=200');
msgWindow.document.write('<BODY>' + message + '<\/BODY>');
msgWindow.document.close();
}
function closepopup() {
if (!msgWindow.closed)
msgWindow.close();
}
//--></SCRIPT>
<P>This is some text outside,
<A HREF="javascript:myvoid()" onMouseOver="showpopup('hello world')" onMouseOut="closepopup()">
<SPAN ID="style1">this is some text inside</SPAN></A>,
and this is more text outside
</BODY>
</HTML>
|
Feedback on 'Q194 How can I adapt the previous script so that a window opens and closes on onMouseOver and onMouseOut?'
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.