Ive never seen this happen with an image map.


Dont this work?





<MAP Name="mymap">
<AREA Shape="rect" Coords="25,180,125,280"
         Href="http://www.example.com";>
</MAP>

<IMG Src="/images/imagemap.gif" Width="500" Height="300"
        Alt="Image Map" Usemap="#mymap">








bruce wrote:
hi...

i've got a problem where i'm trying to play with imagemaps. i created a test
image map, but when i select inside the image map, i 'see' the "?x,y" from
the imagemap, appended to the url in the browser address bar... i get
http://foo.com?3,5 etc...

is there a way to prevent this from occuring??

i'd like to be able to select the imagemap, get the coordinate, and not have
the x,y mouse coordinate show up in the address bar...

i thought i could use an onClick, and go to a javascript function, but i
couldn't figure out how to get the mouse coordinates within the jscript
function.

if i slammed all this inside a frame, would that prevent the url-"x,y"
information from being displayed??

my sample code is below...

thanks

-bruce
[EMAIL PROTECTED]


----------------------------------------------------------------------------
---
[EMAIL PROTECTED] site]# cat map.php
<?
  /*
     test for image maps...
  */
?>
<?
 $_self = $_SERVER['PHP_SELF'];
?>

<html>
<body>
<script language="javascript" type="text/javascript">
<!--

function foo1(q)
{
//   str = window.location.search
//   document.write("fff "+q+"<br>");
// location.href="map.php";
// return true;
}
function foo(e)
{
//q = q+1;
 mX = event.clientX;
 mY = event.clientY;
//   str = window.location.search
   document.write("fff "+mX+" y= "+mY+"<br>");
 location.href="map.php";
 return true;
}
// -->
</script>

<!--
<center><a href="<?=$_self;?>"><img
-->

<center>
<!--
<a href="<?=$_self;?>" onclick ="alert(self.location.search); return false">
-->
<a href="ff.php" onclick="">
<img src="imagemap.gif" ISMAP></a></center>
<p>
<script language="javascript" type="text/javascript">
<!--

str = location.search
 if(str)
 {
   document.write("fff "+str+"<br>");
   //location.href="map.php";
 }

// -->
</script>


</body>
</html>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to