...

View Full Version : ismap / imagemap question



sharyn
02-18-2005, 09:42 PM
I am using the ismap tag and for the most part, it works fabulously. However, recently I went on a co-workers computer and noticed that the ismap coordinates are incorrect. the image is set to be 800 x 400 but on his computer it thinks the image is 100 x 500!!! So far it's the only computer that does that. Has anyone else encountered this problem and how to solve it?

thanks a mill,
sharyn

rmedek
02-18-2005, 10:00 PM
Well, since there's no link, code, screenshot, or anything, I will use my magic eight ball....

Apparently, the answer is "Signs point to yes." :confused:

:D Well, ismap is really, really old and not very well implemented. Try another alternative:

http://www.w3schools.com/tags/tag_map.asp

Hopefully that works out for you. Make sure you're using a proper Doctype, etc, just to be extra careful.

sharyn
02-22-2005, 09:51 PM
Well, I need to get the x,y coordinates back. I am clicking on a map of something and I need to calculate the lat & long of where I clicked. Can I do this with the map tag?

rmedek
02-23-2005, 10:49 AM
Yes, sort of. The map tag defines the client-side image map. Within the map tag are the area shapes, where you define the clickable regions. So if you're using ismap for an image map then <map> will work just fine, and it's valid.

If you need to get a reference of the coordinates for something other than an image map, then javascript might be the way to go. You can use ismap, but you can't count on it, as it's (as you see) not implemented by every browser.

A link to the page in question might help us help you a little better...

whizard
02-23-2005, 03:26 PM
I may be off-track, but if you're having trouble with making a imagemap, mapedit is pretty cool.

http://www.boutell.com/mapedit/

Dan

sharyn
02-24-2005, 07:43 PM
rmedek,

I need x,y coordinates back from clicking on the image map. I can't see that the regular <map> tag does this.... or does it and I just can't figure it out?

Sorry but the page is internal.

- sharyn

rmedek
02-24-2005, 11:27 PM
No. <map> will not return the coordinates, it is a container for predefined areas that are clickable. You will need to use javascript or some sort of processing to get the coordinates.

I would pm a moderator to move this to the correct forum if that's the case.

rmedek
02-24-2005, 11:37 PM
Okay, forget everything I ever told you. I'm an idiot :D

I was confusing ismap as a tag versus ismap as an attribute, and of course, it is in the xhtml spec (the link is to the XHTML2 working draft):

http://www.w3.org/TR/2002/WD-xhtml2-20021211/mod-ssImgMap.html

So where's the smiley for embarassment? :o Oh, there it is.

Anyways... I understand the link is internal but perhaps if you could at least post some code someone an dig in and take a closer look.

sharyn
02-24-2005, 11:44 PM
rmedek,

Here is the code :


<div align="center">
<font color="#3366FF" size="2" face="Trebuchet MS">
<table width="25%" border="1" align="center">
<tr>
<td>
<div align="center">
<font color="#3366FF" face="Trebuchet MS">[ Click anywhere on the map ]</font></div>
</td>
</tr>
<tr>
<td>
<a href="intermediate.php?UserID=2&ResLev=0&Zoom=on"><img src="Maps/WorldMap.jpg" width="800" border="0" ismap></a>
</td>
</tr>
</table>
</font>
</div>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum