javascript popup image

Posted by sam on Stack Overflow See other posts from Stack Overflow or by sam
Published on 2010-04-21T10:54:17Z Indexed on 2010/04/21 11:13 UTC
Read the original article Hit count: 120

Filed under:

folks., i need to popup image on image hover?the image should be placed just above mouse pointer? i tried to implement event.x,event.y.. but it is not positoning well in all browsers..?is css need to be used here or please give me javascript code..

Code sample

function Large(obj,id,e) 
{ 
    var imgbox=document.getElementById("imgbox");
    // this is div tag,inside div i am placing imagebutton.. 
    var imgbtn=document.getElementById('<%=ImageButton3.ClientID%>'); 
    imgbox.style.visibility='visible'; 
    imgbtn.src=obj; 
    imgbox.style.left=event.x; 
    imgbox.style.top= event.y; 
}

thank you

© Stack Overflow or respective owner

Related posts about JavaScript