[thelist] possible jscript/php/frames question!!

bruce bedouglas at earthlink.net
Fri Jun 17 22:21:39 CDT 2005


max...

i'm not following you here....

if i have something like the code listed, where would the submit/form go...
keep in mind, i want to have the uer select a number of points, capture the
information in an array, and then send the array to the server?

my research is also indicating that given the inconsistancies between
browsers, that it's not easy to develop a process/code to operate across all
(IE/Mozilla/Opera/Firefox/Safari) browsers that will effectively get back
the coordinates relative to the image.. this apparently is true when you
have to deal with the issue of scrolling...

current test code...


---------------------------------------------------------------------------
<?
  /*
     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="<?=$_self;?>" 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>
------------------------------------------------

thanks

-bruce


-----Original Message-----
From: Maximillian Schwanekamp [mailto:lists at neptunewebworks.com]
Sent: Friday, June 17, 2005 7:35 PM
To: bedouglas at earthlink.net; thelist at lists.evolt.org
Subject: Re: [thelist] possible jscript/php/frames question!!


bruce wrote:
> how would i do that, and build an array of coordinates... before i post
them
> back to the server via the form???

When you have <input type="submit"..> you'll get x and y values in
$_POST instead of submit.  You could have a big ol' image as input, and
you'll get the coordinates of where the user clicked on the image on the
backend.

--
Maximillian Von Schwanekamp
http://www.neptunewebworks.com/



More information about the thelist mailing list