Feedback on: irt.org FAQ Knowledge Base Q35
Length:
Too short
Comments:
The script that you gave works, but in a weird way - for some reason it returns the coordinates of the PREVIOUS click (on both IE5.5 and Nav4.7) How come?
Worth:
Not worth reading
Comments:
What was that? a joke? This code doesn't make sense at all.
Worth:
Very worth reading
Length:
Too short
Technical:
Comments:
It's a good start for building a page that passes image coordinates (in pixels) to some ASP page linked to it.
In facts the page linked to image should be prepared to receive two parameters (x,y).
To make this sample work just turn the provided javascript code into a function and then call it with onClick event when the user presses the mopuse button on the image, like in the code bekow here:
<script language="JavaScript">
function getxy() {
str = location.search;
if (str == "")
document.write("<p>No coordinates specified.");
else {
commaloc = str.indexOf(",");
document.write("<p>The x value is " + str.substring(1, commaloc));
document.write("<p>The y value is " + str.substring(commaloc+1, str.length));
}}
</script>
<a href="#"><img src="/images/GNSoft_computer_works.gif" border="0" ismap onClick:getxy();></a>