Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.