By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,622 Members | 1,103 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,622 IT Pros & Developers. It's quick & easy.

client side image maps

P: n/a
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>
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"C Gillespie" <cs******@hotmail.com> wrote:
I have an image map that works perfectly in firefox, but not IE can anyone
help?
Does it work prefectly when JavaScript is disabled?
<SCRIPT LANGUAGE="JavaScript">
Language is deprecated, use type="text/javascript" instead.
function species(xpath) {
document.form1.xpath.value = xpath;


There's no child of form1 called xpath in your HTML.
Is this snippet incomplete?

Steve

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

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2

P: n/a

"C Gillespie" <cs******@hotmail.com> wrote in message
news:cf**********@ucsnew1.ncl.ac.uk...
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"?
Jul 20 '05 #3

P: n/a
> 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>
Jul 20 '05 #4

P: n/a
"C Gillespie" <cs******@hotmail.com> wrote:
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

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #5

P: n/a
"C Gillespie" <cs******@hotmail.com> wrote:
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.
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.