473,480 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

client side image maps

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
5 2577
"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

"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
> 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
"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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1961
by: tmb | last post by:
Is there a way to use ASP to 'push' a new image to the client every 15 seconds or so? I guess the entire page will have to be 're-sent' to the client but I'm not sure. I'm trying to 'rotate'...
9
9793
by: Don | last post by:
Does anyone know where I can find a client-side function I can reference from within an HTML/JavaScript web page? I'm currently using a core PHP function to do this, but I'd rather do it on the...
4
4630
by: Jim Land | last post by:
I've got an image and an image map, and they work fine together. See it here: http://www.jim-land.com/testing/MapPage01.htm But the image map has way too many points (vertices) in its 87...
5
1857
by: vanisathish | last post by:
Hi I have an application, which has to change to different images based on some conditions. I am trying to call a javascript function(this function changes the images on the front end) from the...
0
1462
by: Kevin Vaughn | last post by:
Is it possible to use image maps to divide up a picture acting as an image button? I have created a map of a building, and now I want to have some sort of pop-up messages when certain parts of...
3
1462
by: Pål Johansen | last post by:
Is it possible to cache portions of a page client side. I have som include pages that I would like to store at the clients cache.
2
1564
by: moondaddy | last post by:
I need to get the size on an image client side before the client uploads it, and if its too large, I need to alert the client rather than doing a postback. The code below successfully writes the...
5
1654
by: thisis | last post by:
Hi All, Hi All, (this is not the same topic as the my previous topic) What objects/methods/properties does VBScript offer for: Assuring/guarantee/make certain that ASP/VBSCript an ELEMENT...
11
1859
by: Adam Sandler | last post by:
Hello, Having an issue with JavaScript in my ASP.Net page. I use some COTS, which for all intents and purposes, simply makes a jpeg file and physically places it in a directory on the web...
0
6911
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7091
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6743
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6966
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
2999
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.