Greets mates -
I have a bit of code that i would like to change but i dont know enough about javascript to do this.
i have designed a page that gets an x - y cord from a mysql DB. the links look something like:
<a href="location-view.pl?LOCATION-ID=74&USER-ID=1" onmouseover="CORDX=300&CORDY=-246" class="link">Accra Port</a>
<a href="location-view.pl?LOCATION-ID=169&USER-ID=1" onmouseover="CORDX=-3900&CORDY=-67" class="link">Aden Bay Battlefield</a>
the javascript i kinda have (who knows if this is right) is as follows:
<SCRIPT TYPE="text/javascript">
define("RATIO", 0.5979);
function ConvertX($thisx)
{
return round(((-$cordx)*RATIO)+XMOVE);
}
function ConvertY($thisy)
{
return round(($cordy*RATIO)+YMOVE);
}
</SCRIPT>
then i need to place a flag on those X - Y cords into another image on the same page on the mouseover event:
<div id="img1" align="center"><img src="/upload/world/world-med.jpg" alt="No Larger then 480 x 367" name="IMAGE_NAME" id="IMAGE_NAME" width="480" height="367" border="0"</div>
anyhelp would be apreshiated! even a point into the right direction would be - this is for a game DB (game: Voyage of the Century for any players )
thanks in advanced!
I have a bit of code that i would like to change but i dont know enough about javascript to do this.
i have designed a page that gets an x - y cord from a mysql DB. the links look something like:
<a href="location-view.pl?LOCATION-ID=74&USER-ID=1" onmouseover="CORDX=300&CORDY=-246" class="link">Accra Port</a>
<a href="location-view.pl?LOCATION-ID=169&USER-ID=1" onmouseover="CORDX=-3900&CORDY=-67" class="link">Aden Bay Battlefield</a>
the javascript i kinda have (who knows if this is right) is as follows:
<SCRIPT TYPE="text/javascript">
define("RATIO", 0.5979);
function ConvertX($thisx)
{
return round(((-$cordx)*RATIO)+XMOVE);
}
function ConvertY($thisy)
{
return round(($cordy*RATIO)+YMOVE);
}
</SCRIPT>
then i need to place a flag on those X - Y cords into another image on the same page on the mouseover event:
<div id="img1" align="center"><img src="/upload/world/world-med.jpg" alt="No Larger then 480 x 367" name="IMAGE_NAME" id="IMAGE_NAME" width="480" height="367" border="0"</div>
anyhelp would be apreshiated! even a point into the right direction would be - this is for a game DB (game: Voyage of the Century for any players )
thanks in advanced!