Client Side Include file not working with Firefox

M

Mike Azzopardi

Hi All

I'm hoping someone can help with this problem I've found. I have a Gif Menu
with links as an image map. I wish to use a client side include file on my
pages so I can update the menu once, and it reflects on all the pages on the
site.

This calls myinclude.js (which is on everypage) that needs the menu:
<SCRIPT LANGUAGE="JavaScript" type="text/javascript"
src="myInclude.js"></SCRIPT>

myInclude.js (basically a table row with the image and image map):
document.write('<table width="100%" height="2%" border=0 align="center"
cellpadding=0 cellspacing=0 bordercolor="#FFFFFF" hspace="2">'
+ ' <tr> '
+ ' <td height="20" bgcolor=#000066> '
+ ' <div align="center" class="style1"><strong><font color="#FFFFFF"
size="4" face="Courier New, Courier, mono"><img src="menunew.GIF"
width="776" height="21" border="0" usemap="#Map"></font></strong> '
+ ' <map name="Map">'
+ ' <map name="Map"><area shape="rect" coords="2,3,60,18"
href="index.html">'
+ ' <area shape="rect" coords="85,3,167,20" href="artists.htm">'
+ ' <area shape="rect" coords="193,3,326,20" href="project.htm">'
+ ' <area shape="rect" coords="345,3,436,20" href="form/index.htm">'
+ ' <area shape="rect" coords="457,3,574,20" href="http://www.heifer.org"
target="_blank">'
+ ' <area shape="rect" coords="598,3,689,20" href="contact.htm">'
+ ' <area shape="rect" coords="712,3,772,20" href="links.htm">'
+ ' </map>'
+ ' </div></td>'
+ ' </tr>'
+ ' <tbody>'
+ ' </tbody>'
+ '</table>');

This all works fine with IE. With Firefox, just the image displays
correctly - the links do not appear as active.

Any ideas appreciated.

Mike
 
J

Jim Moe

Mike said:
I'm hoping someone can help with this problem I've found. I have a Gif Menu
with links as an image map. I wish to use a client side include file on my
pages so I can update the menu once, and it reflects on all the pages on the
site.
What if the visitor has Javascript disabled?
This calls myinclude.js (which is on everypage) that needs the menu:
<SCRIPT LANGUAGE="JavaScript" type="text/javascript"
src="myInclude.js"></SCRIPT>

[...]
This all works fine with IE. With Firefox, just the image displays
correctly - the links do not appear as active.
Does FF's javascript console show any errors?
 
B

BootNic

Mike Azzopardi said:
[snip]
+ ' <map name="Map">'
+ ' <map name="Map"> [snip]

This all works fine with IE. With Firefox, just the image displays
correctly - the links do not appear as active.

It may work better if you remove the extra <map name="Map">

--
BootNic Monday, April 03, 2006 4:18 PM

You can turn painful situations around through laughter. If you can
find humor in anything - even poverty - you can survive it.
*Bill Cosby*
 
M

Mike Azzopardi

It may work better if you remove the extra <map name="Map">

Yep thats it :). Well spotted.

Thanks for the help
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top