Mouseover Pops Up DHTML component

[Total: 0    Average: 0/5]

This shows how to have a DHTML item popup centered on the window on a mouseover.

Head Code:

<script src="/bin/div_construct_ie_ns4_ns6.js"></script>
<script>
var div1abc = new NewDiv(window,"dabc","",350,300,200,120,10,true);
function initme() {div1abc.centerX();return;}
</script>

Body Code:

<script>
var isIE  = document.all?true:false;
var isNS4 = document.layers?true:false;
var isNS6 = !isNS4&&!isIE&&document.getElementById?true:false;

div1abc.output();
hideDiv();
function showDiv(_v)
{
  var _offset=0;
  var _baseY=200;
  if(isIE)
    _offset=document.body.scrollTop;
  if(isNS4||isNS6)
    _offset=window.pageYOffset;
  div1abc.moveTo(div1abc.getX(),_baseY+_offset);
  if(isIE||isNS6)
    div1abc.setBody('<div style="color: #000060;background-color:#EEEECC;border-color: steelblue;border-width: 3; border-style:ridge;width: 300" align=left><table border=0 cellpadding=10><tr><td>'+_v+'</td></tr></table></div>');
  if(isNS4)
    div1abc.setBody('<div align=left><div style="color: blue;background-color:#EEEECC;border-color: white;border-width: 3; border-style:ridge;width: 300;"><table bgcolor="steelblue" border=0 cellpadding=0><tr><td><table width="300" height="100%" cellpadding=5 bgcolor="#EEEECC"><tr><td><font color=#000060>'+_v+'</font></td></tr></table></td></tr></table></div></div>');
  div1abc.show();
}

function hideDiv()
{
  div1abc.hide();
}
</script>



<font size=1>  
<a onmouseover="showDiv('<b><center>Help Title</b></center><BR>The content of the help popup DHTML goes here.')" 
   onmouseout="hideDiv()" 
   href="#">Mouse Over Here To See Help Menu</a>
</font>

Times Viewed: 0

Leave a Reply

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