/    Sign up×
Community /Pin to ProfileBookmark

Works in IE but not NS

Is there any reason this image map would work in IE but not in NE? If so please help.

[CODE] <img id=”nav” name=”nav” src=”blank.gif” border=”0″ alt=”Navigation Bar” usemap=”#com” border=”0″ />

<map id=”com”>
<area shape=”rect” coords=”0,0,125,70″ href=”javascript:showContent(‘com1’);homeindex2();”>
<area shape=”rect” coords=”130,0,255,70″ href=”javascript:showContent(‘com2’);homeindex2();”>
<area shape=”rect” coords=”260,0,385,70″ href=”javascript:showContent(‘com3’);homeindex2();”>
</map>

<map id=”tra”>
<area shape=”rect” coords=”0,0,125,70″ href=”javascript:showContent(‘tra1’);homeindex2();”>
<area shape=”rect” coords=”130,0,255,70″ href=”javascript:showContent(‘tra2’);homeindex2();”>
<area shape=”rect” coords=”260,0,385,70″ href=”javascript:showContent(‘tra3’);homeindex2();”>
</map>

<map id=”med”>
<area shape=”rect” coords=”0,0,125,70″ href=”javascript:showContent(‘med1’);homeindex2();”>
<area shape=”rect” coords=”130,0,255,70″ href=”javascript:showContent(‘med2’);homeindex2();”>
<area shape=”rect” coords=”260,0,385,70″ href=”javascript:showContent(‘med3’);homeindex2();”>
</map>

<map id=”mil”>
<area shape=”rect” coords=”0,0,125,70″ href=”javascript:showContent(‘mil1’);homeindex2();”>
<area shape=”rect” coords=”130,0,255,70″ href=”javascript:showContent(‘mil2’);homeindex2();”>
<area shape=”rect” coords=”260,0,385,70″ href=”javascript:showContent(‘mil3’);homeindex2();”>
</map>[/CODE]

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@cootheadJan 15.2007 — Hi there Heliozentric,

you need to name the maps also....
[color=navy]
&lt;map id="com" [color=purple]name="com"[/color]&gt;
&lt;map id="tra" [color=purple]name="tra"[/color]&gt;
&lt;map id="med" [color=purple]name="med"[/color]&gt;
&lt;map id="mil" [color=purple]name="mil"[/color]&gt;
[/color]

[i]coothead[/i]
Copy linkTweet thisAlerts:
@HeliozentricauthorJan 15.2007 — Hmm, that didn't seem to work. I need to get in the habit of naming everything though.
Copy linkTweet thisAlerts:
@WebJoelJan 16.2007 — Hmm, that didn't seem to work. I need to get in the habit of naming everything though.[/QUOTE] [B]name=""[/B] is the older way of doing this. It is supposed to be replaced by [B]id=""[/B] but to serve older browsers (like 4.x maybe??), you use both. A newer browser will pick the one it needs, use it and (presumeably) ignore the other one...

I am not familiar however, with this:

href="javascript:showContent('com1');homeindex2();"

:way of referring. Explain this to me, -what does it do (explicitly, not just 'it is supposed to show the page').

-What version of NS are you using, btw? Does it work in any browser [I]other than [/I]IE? If you discover that this does not work in Firefox, Opera, Mozilla, etc., -then I'd say that it is ' href="javascript:showContent('com1');homeindex2();" ' that is not working, not NS not doing it right...
Copy linkTweet thisAlerts:
@felgallJan 16.2007 — Often browsers need the javascript to be actually triggered by events in order to work properly. Don't use [b]href="javascript:[/b] ever as it often doesn't work and attaching the same code to the [b]onclick=[/b] always works. Also unless you are linking to somewhere don't use <a>
Copy linkTweet thisAlerts:
@HeliozentricauthorJan 16.2007 — No, I know for sure that it is not the javascript. Even with no javascript at all the map still isn't being placed. Trust me, I trouble shot the javascript all night last night. I think It map have something to do with positioning.
Copy linkTweet thisAlerts:
@cootheadJan 16.2007 — Hi there Heliozentric,

a link to your site will be the only way that members here will have a chance of solving your problem.

[i]coothead[/i]
Copy linkTweet thisAlerts:
@CentauriJan 16.2007 — As this seems to be some sort of guessing competition, I'll have a go ..... ?

What size is the image, and is its size defined elsewhere (css) ?? - I ask as the filename "blank.gif" is quite often used for a 1pixel transparent image. Whilst a 1pixel image CAN be used here, it will need to be stretched to the desired size.

Cheers

Graeme
×

Success!

Help @Heliozentric spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...