MouseOver show New Content

[Total: 0    Average: 0/5]

This file shows how to create a “dynamic” updated field on the page.

Head Code:

<script type=text/javascript>
app=navigator.appName;
ver=navigator.appVersion;
ver=ver.substring(0,1);
ver=parseInt(ver);
img=false;
if ((app=="Microsoft Internet Explorer")&&(ver>=4)) {img=true}

function tocmover(srcimg) {
  if (img){ window.event.srcElement.style.color = "#00FF00" }
  document.images.tocline.src = srcimg
}

function tocmout() {
  if (img){ window.event.srcElement.style.color = "#0000FF" }
  document.images.tocline.src = "http://www.js-examples.com/images/blue_ball0.gif"
}

function over(strng) {
  subnav.innerHTML = strng;
  window.event.srcElement.style.color = "#FFFF00"
}

function overheader() { 
window.event.srcElement.style.color = "#FFFF00"}

function out() {
  subnav.innerHTML = " <center><a class=headerlink onmouseover='overheader()' onmouseout='outheader()' href='#'>Default PopUp Text #2</a></center>"
  window.event.srcElement.style.color = "#FF0000"
}

function outheader() { 
window.event.srcElement.style.color = "#FF4499"}
</script>

Body Code:

<table border=0 bgcolor=#00184A cellpadding=0 cellspacing=0 width=100%>
<tr><td height=30 valign=middle align=center>
<DIV ID=subnav name=subnav class=result>
 <a onmouseover='overheader()' onmouseout='outheader()' href='#'>
 This is the Default Text To Appear Here!</a>
</DIV></td></tr>
</table>
<BR><a class=sidenav onmouseover='over("<center>PopUp Text #1 - Resets onmouseout.")' onmouseout='out()' href="http://www.cyber-portal.com">Link #1 - Clears PopUp Text upon Mouse Out</a>
<BR><a class=sidenav onmouseover='over("<center>PopUp Text #2 - Stays On onmouseout.")'  href="http://www.cyber-portal.com">Link #2 - Keeps PopUp Text even after mouse out</a>
<BR><a class=sidenavactive href="http://www.js-examples.com/">Link #3 - Does not update PopUp Text</a>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *