Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show a pop up window after swhowing an image in mouse over

Status
Not open for further replies.

woodstock88

Programmer
Sep 27, 2006
1
MX
Hello :) i'm relatively new in javascript... I have a script that onmouseover an image map it displays another image on top.. what I have not being able to do correctly is the image that is display onmouseover when I click on it will display me a popup window... my code is the following:
<script language="javascript1.2" >
function hidePic(picID)
{
var pic = document.getElementById(picID).style
pic.display = (pic.display != 'block') ? "block" : "none"
}

function showPic(id,txt)
{ document.getElementById(id).innerHTML = txt
}

function mypopup()
{
mywin = window.open("imagenes/icon_play.gif","mywindow","status=0,resizable=0,width=350,height=250, directories=0")

} </script>
<body>
<div id="myPic"
style="position: absolute; width: 60px; height: 55px;
z-index: 1; left: 30px; top: 50px;
border: 0px; display: none;">
</div>
<img src="icon_play.gif" width="80" height="80" usemap="#pics" border="0"/>

<map name="pics">
<area shape="rect" coords="10,10,80,80" href="javascript: void(0)" onmouseover="hidePic('myPic');showPic('myPic',
'<img src = \'image\\icon.gif\'>');" onmouseout="hidePic('myPic');" onmousedown="mypopup();"/>
</map>


How I have it right now i know the onmousedown will work in the map image... how can i make it work in the image display onmouseover...
thanx :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top