Click here to get back home

client side image maps

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
client side image maps C Gillespie 08-09-2004
Posted by C Gillespie on August 9, 2004, 7:04 pm
Please log in for more thread options
Dear All,

I have an image map that works perfectly in firefox, but not IE can anyone
help?

The code I use is below.

Thanks for any help

Colin


<snip>
<SCRIPT LANGUAGE="JavaScript">
function species(xpath) {
document.form1.xpath.value = xpath;
document.form1.action="/demo/editor/modSpecie.spy";
document.form1.submit();
}
</SCRIPT>

<form name="form1" method="post" action='#'>

<IMG SRC="/demo/graphs/09794069.gif" USEMAP=#mainmap>
<MAP NAME="mainmap">
<area shape="rect" href="Javascript:species(&apos;//sbml:species[1]&apos;)"
title="Y1" alt="Y1" coords="244,53,316,101">

</map>
</form>
</snip>




Posted by Harlan Messinger on August 9, 2004, 3:13 pm
Please log in for more thread options

> Dear All,
>
> I have an image map that works perfectly in firefox, but not IE can anyone
> help?

Would you call a mechanic and say "My car isn't working. What should I do?"
without giving him anything more specific to go on than "isn't working"?




Posted by C Gillespie on August 10, 2004, 10:31 am
Please log in for more thread options
> Would you call a mechanic and say "My car isn't working. What should I
> do?" without giving him anything more specific to go on than "isn't
> working"?

I apologise, in my haste to simply things, I went overboard. Try again.
Here is my code. Any help welcome.

Oh, and it works it with Opera and when I disable Javascript IE still
doesn't work.

Thanks

Colin

<SCRIPT type="text/javascript">
function species(xpath){
document.form1.xpath.value = xpath;
document.form1.action="/demo/editor/modSpecie.spy";
document.form1.submit();
}
function reaction(xpath) {
document.form1.xpath.value = xpath;
document.form1.action="/demo/editor/modReaction.spy";
document.form1.submit();
}
</SCRIPT>

<form name="form1" method="post" action='#'>
<input type="hidden" name="xpath" value="None">
</form>

<IMG SRC="/demo/graphs/86306461.gif" USEMAP=#mainmap>
<MAP NAME="mainmap">
<area shape="rect"
href="Javascript:species(&apos;//sbml:species[1]&apos;)" title="Y2" alt="Y2"
coords="253,90,325,138">
<area shape="rect"
href="Javascript:reaction(&apos;//sbml:reaction[1]&apos;)" title="Y1"
alt="Y1" coords="72,90,144,138">
</map>




Posted by Harlan Messinger on August 10, 2004, 8:54 am
Please log in for more thread options

>> Would you call a mechanic and say "My car isn't working. What should I
>> do?" without giving him anything more specific to go on than "isn't
>> working"?
>
>I apologise, in my haste to simply things, I went overboard. Try again.
>Here is my code. Any help welcome.
>
>Oh, and it works it with Opera and when I disable Javascript IE still
>doesn't work.

You still haven't said what "doesn't work" means. It ignores your
click? You get an error within the code? It does something else you
didn't expect? Have you tried troubleshooting at all?

>
>Thanks
>
>Colin
>
><SCRIPT type="text/javascript">
> function species(xpath){
> document.form1.xpath.value = xpath;
> document.form1.action="/demo/editor/modSpecie.spy";
> document.form1.submit();
> }
> function reaction(xpath) {
> document.form1.xpath.value = xpath;
> document.form1.action="/demo/editor/modReaction.spy";
> document.form1.submit();
> }
></SCRIPT>
>
><form name="form1" method="post" action='#'>
> <input type="hidden" name="xpath" value="None">
></form>
>
><IMG SRC="/demo/graphs/86306461.gif" USEMAP=#mainmap>
><MAP NAME="mainmap">
> <area shape="rect"
>href="Javascript:species(&apos;//sbml:species[1]&apos;)" title="Y2" alt="Y2"
>coords="253,90,325,138">
> <area shape="rect"
>href="Javascript:reaction(&apos;//sbml:reaction[1]&apos;)" title="Y1"
>alt="Y1" coords="72,90,144,138">
></map>
>


--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ๔ter le premier point de mon adresse de courriel.


Posted by Steve Pugh on August 10, 2004, 11:57 am
Please log in for more thread options

>Oh, and it works it with Opera and when I disable Javascript IE still
>doesn't work.

Are you saying that it works when you disable JavaScript in Opera (I
don't believe you), or that it doesn't work in when you disable
JavaScript in IE (I believe you).

What you have done will not work, ever, in any browser, if JavaScript
is disabled. Hence it is not suitable for deployment on the WWW.

> <area shape="rect"
>href="Javascript:species(&apos;//sbml:species[1]&apos;)" title="Y2" alt="Y2"
>coords="253,90,325,138">

Why the &apos;? What is the value that you want to pass to the server?
Is it
&apos;//sbml:species[1]&apos;
or
'//sbml:species[1]'
or
//sbml:species[1]

In each of the above cases your code should read:
species('&apos;//sbml:species[1]&apos;')
species(''//sbml:species[1]'')
species('//sbml:species[1]')

I'd recommend that further JavaScript questions are asked in
comp.lang.javascript.

        Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor



Similar ThreadsPosted
client-side image size changing question June 22, 2005, 6:26 am
Post data to server from javascript on client side January 17, 2005, 3:47 pm
Creating image maps with Adobe Illustrator or Image Ready. March 8, 2005, 12:42 pm
[newbie] client side jscript for a table inside a table March 24, 2005, 8:01 am
Image maps within
April 23, 2007, 12:43 am
image maps + xhtml strict October 23, 2004, 9:16 pm
Image maps and area alt text June 14, 2007, 8:08 am
Safari, image maps, and links May 12, 2008, 3:58 pm
clickable image w/maps moves when clicked April 10, 2008, 10:18 am
Showing divs side by side July 19, 2007, 5:02 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap