-
DHTML show image
1) Script Title: DHTML show image
2) Script URL (on DD):
HTTP://www.donthaveonyet.com
3) Describe problem:
im having trouble doing a mouseover show image at X Y cord - ive searched the web and cant seem to find what im looking for. 1st i should say im NO java / dhtml expert so this question is prob lame.
here is what im trying to do: i ahve an image:
<div id="img1"><img src="/upload/world/world-tiny.jpg" name="IMAGE_NAME" id="IMAGE_NAME" width="480" height="367" border="0" onClick="javascript:updateCoord(event);"></div>
there are links on the same page with X Y cords:
<a href="location-view.pl" onMouseOver="ShowFlag('152','270')">Jejudo</a>
these X Y cords must be run through some mathmatical equasion to show it correctly on the map:
define("XMOVE", 112);
define("YMOVE", 178);
define("RATIO", 0.1688);
function ConvertX($thisx)
{
return round(((-$thisx)*RATIO)+XMOVE);
}
function ConvertY($thisy)
{
return round(($thisy*RATIO)+YMOVE);
}
then the cords sent to the flag image:
<div id="Red_Dot" style="position:absolute; width:5px; height:5px; z-index:1; left: X px; top: Y px; display:block;" onload="javascript:updateCoord(event);"><img src="/images/site/map-marker.gif" width="10" height="10" border="0" ></div>
and this image placed on top of the original image - showing the location on the map. OH MY GOD im sooooo lost!
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks