Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q35 How do I get the x,y position of the image clicked to return?

irt.org | Knowledge Base | JavaScript | Image | Q35 [ previous next ]

Q35 How do I get the x,y position of the image clicked to return?

<a href="thisdocument.html"><img src="image.gif" border="0" ismap></a>

<script language="JavaScript"><!--
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>

Feedback on 'Q35 How do I get the x,y position of the image clicked to return?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.