Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1217 How can I show a description of where a link will go using DHTML?

You are here: irt.org | FAQ | DHTML | Q1217 [ previous next ]

Try:

<html>
<head>

<style type='text/css'><!--
.changeClass { position:absolute; top:400; left:180; }
--></style>

<script language=javascript><!--
function changeMe(toThis) {
     if (document.all) {
         textDiv.innerHTML=toThis;
     }
     else if (document.layers) {
         with(document.textDiv.document) {
             open();
             write(toThis);
             close();
         }
     }
}
//--></script>
</head>

<body>
<a href="javascript:changeMe('Welcome')" onMouseOver="changeMe('Hello')" onMouseOut="changeMe('Goodbye')">Click to Welcome</a><br>
<a href="javascript:changeMe('This is a test')" onMouseOver="changeMe('Hello1')" onMouseOut="changeMe('Goodbye1')">Click for test</a><br>

<div id="textDiv" class=changeClass>This is text that will change dynamically</div>
</center>

</body>
</html>

©2018 Martin Webb