Home > ASP.Net, Javascript > Show Dynamic DIV as Tooltip

Show Dynamic DIV as Tooltip


try this example :-


function ShowDiv(divid,iframe, state)
 var DivRef = document.getElementById(divid);
 var IfrRef = document.getElementById(iframe);
  DivRef.style.display = "block";
  IfrRef.style.width = DivRef.offsetWidth;
  IfrRef.style.height = DivRef.offsetHeight;
  IfrRef.style.top = DivRef.style.top;
  IfrRef.style.left = DivRef.style.left;
  IfrRef.style.zIndex = DivRef.style.zIndex - 1;
  IfrRef.style.display = "block";
  DivRef.style.display = "none";
  IfrRef.style.display = "none";

<a href="#" onclick="ShowDiv('div','iframe', true); return false;">
<img src="image.gif" border="0" style="margin: 0px;" /></a>
<div id="div">div message</div>
<iframe id="iframe" scrolling="no" frameborder="0"></iframe>

 Hope this helps

Good Luck

Categories: ASP.Net, Javascript
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: