Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback: irt.org FAQ Knowledge Base Q35

Feedback on: irt.org FAQ Knowledge Base Q35

Sent by Arman on May 13, 2001 at 04:16:05: - feedback #2723

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?


Sent by x on September 24, 2002 at 11:19:48: - feedback #4165

Worth:
Not worth reading

Comments:
What was that? a joke? This code doesn't make sense at all.


Sent by gianluca on Monday June 04, 2007 at 00:28:57 - feedback #4664

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>








©2018 Martin Webb