Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-18-2005, 08:42 PM   PM User | #1
sharyn
New Coder

 
Join Date: Feb 2004
Location: california
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
sharyn is an unknown quantity at this point
ismap / imagemap question

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
__________________
'tis best not to get worked up over nothing
sharyn is offline   Reply With Quote
Old 02-18-2005, 09:00 PM   PM User | #2
rmedek
Senior Coder

 
Join Date: Nov 2003
Location: Minneapolis, MN
Posts: 2,879
Thanks: 2
Thanked 65 Times in 56 Posts
rmedek is on a distinguished road
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."

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.
__________________
drums | web
rmedek is offline   Reply With Quote
Old 02-22-2005, 08:51 PM   PM User | #3
sharyn
New Coder

 
Join Date: Feb 2004
Location: california
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
sharyn is an unknown quantity at this point
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?
__________________
'tis best not to get worked up over nothing
sharyn is offline   Reply With Quote
Old 02-23-2005, 09:49 AM   PM User | #4
rmedek
Senior Coder

 
Join Date: Nov 2003
Location: Minneapolis, MN
Posts: 2,879
Thanks: 2
Thanked 65 Times in 56 Posts
rmedek is on a distinguished road
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...
__________________
drums | web
rmedek is offline   Reply With Quote
Old 02-23-2005, 02:26 PM   PM User | #5
whizard
Senior Coder

 
whizard's Avatar
 
Join Date: Jan 2005
Location: Philadelphia, PA, USA
Posts: 1,457
Thanks: 10
Thanked 37 Times in 37 Posts
whizard will become famous soon enoughwhizard will become famous soon enough
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
__________________
If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.
Step 1: Learn. Step 2: Search. Step 3: Post here.
whizard is offline   Reply With Quote
Old 02-24-2005, 06:43 PM   PM User | #6
sharyn
New Coder

 
Join Date: Feb 2004
Location: california
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
sharyn is an unknown quantity at this point
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
__________________
'tis best not to get worked up over nothing
sharyn is offline   Reply With Quote
Old 02-24-2005, 10:27 PM   PM User | #7
rmedek
Senior Coder

 
Join Date: Nov 2003
Location: Minneapolis, MN
Posts: 2,879
Thanks: 2
Thanked 65 Times in 56 Posts
rmedek is on a distinguished road
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.
__________________
drums | web
rmedek is offline   Reply With Quote
Old 02-24-2005, 10:37 PM   PM User | #8
rmedek
Senior Coder

 
Join Date: Nov 2003
Location: Minneapolis, MN
Posts: 2,879
Thanks: 2
Thanked 65 Times in 56 Posts
rmedek is on a distinguished road
Okay, forget everything I ever told you. I'm an idiot

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-...-ssImgMap.html

So where's the smiley for embarassment? 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.
__________________
drums | web
rmedek is offline   Reply With Quote
Old 02-24-2005, 10:44 PM   PM User | #9
sharyn
New Coder

 
Join Date: Feb 2004
Location: california
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
sharyn is an unknown quantity at this point
rmedek,

Here is the code :

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>
__________________
'tis best not to get worked up over nothing
sharyn is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:01 PM.


Advertisement
Log in to turn off these ads.