OnMouseOver menu
HejsaJeg har problemer med denne menu.
Hvis koden ser således ud virker den.
****************************<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">
<HTML>
<HEAD>
<TITLE>MARJ.DK</TITLE>
<META NAME=\"Generator\" CONTENT=\"Stone\'s WebWriter 3\">
<LINK HREF=\"standard.css\" REL=\"stylesheet\" TYPE=\"text/css\">
<script language=\"JavaScript\">
<!--
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == \"Netscape\" && browserVer >= 3) version = \"n3\";
else version = \"n2\";
if (browserName == \"Microsoft Internet Explorer\" && browserVer >= 4) version = \"n3\";
if (version == \"n3\") {
chr1on = new Image();
chr1on.src = \"../images/knap/forside2.gif\";
chr1off = new Image();
chr1off.src = \"../images/knap/forside.gif\";
chr2on = new Image();
chr2on.src = \"../images/knap/produkt2.gif\";
chr2off = new Image();
chr2off.src = \"../images/knap/produkt.gif\";
chr3on = new Image();
chr3on.src = \"../images/knap/ref2.gif\";
chr3off = new Image();
chr3off.src =\"../images/knap/ref.gif\";
}
function img_act(imgName) {
if (version == \"n3\") {
imgOn = eval(imgName + \"on.src\");
document [imgName].src = imgOn;
}
}
function img_inact(imgName) {
if (version == \"n3\") {
imgOff = eval(imgName + \"off.src\");
document [imgName].src = imgOff;
}
}
// -->
</script>
</HEAD>
<BODY>
<TABLE WIDTH=\"100%\" BORDER=\"0\" BGCOLOR=\"#FFFFFF\" CELLSPACING=\"1\">
<TR ALIGN=\"center\">
<TD WIDTH=\"150\" BGCOLOR=\"#FFFFFF\"><a href=\"http://www.danmark.dk\" onMouseover=\"img_act(\'chr1\')\" onMouseout=\"img_inact(\'chr1\')\"><IMG SRC=\"../images/knap/forside.gif\" BORDER=\"0\" WIDTH=\"120\" HEIGHT=\"15\" ALIGN=\"bottom\" ALT=\"Besøg: http://www.danmark.dk\" name=\"chr1\"></a></TD>
<TD WIDTH=\"150\" BGCOLOR=\"#FFFFFF\"><a href=\"http://www.england.dk\" onMouseover=\"img_act(\'chr2\')\" onMouseout=\"img_inact(\'chr2\')\"><IMG SRC=\"../images/knap/produkt.gif\" BORDER=\"0\" WIDTH=\"120\" HEIGHT=\"15\" ALIGN=\"bottom\" ALT=\"Besøg: http://www.england.dk\" name=\"chr2\"></a></TD>
<TD WIDTH=\"150\" BGCOLOR=\"#FFFFFF\"><a href=\"http://www.england.dk\" onMouseover=\"img_act(\'chr3\')\" onMouseout=\"img_inact(\'chr3\')\"><IMG SRC=\"../images/knap/ref.gif\" BORDER=\"0\" WIDTH=\"120\" HEIGHT=\"15\" ALIGN=\"bottom\" ALT=\"Besøg: http://www.england.dk\" name=\"chr3\"></a></TD>
</TR>
</TABLE>
</BODY>
</HTML>
**************************
men hvis den ser sådan her ud virker den ikke
****************************
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">
<HTML>
<HEAD>
<TITLE>MARJ.DK</TITLE>
<META NAME=\"Generator\" CONTENT=\"Stone\'s WebWriter 3\">
<LINK HREF=\"standard.css\" REL=\"stylesheet\" TYPE=\"text/css\">
<script language=\"JavaScript\">
<!--
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == \"Netscape\" && browserVer >= 3) version = \"n3\";
else version = \"n2\";
if (browserName == \"Microsoft Internet Explorer\" && browserVer >= 4) version = \"n3\";
if (version == \"n3\") {
chr1on = new Image();
chr1on.src = \"../images/knap/forside2.gif\";
chr1off = new Image();
chr1off.src = \"../images/knap/forside.gif\";
chr2on = new Image();
chr2on.src = \"../images/knap/produkt2.gif\";
chr2off = new Image();
chr2off.src = \"../images/knap/produkt.gif\";
chr3on = new Image();
chr3on.src = \"../images/knap/ref2.gif\";
chr3off = new Image();
chr3off.src =\"../images/knap/ref.gif\";
}
chr4on = new Image();
chr4on.src = \"../images/knap/kontakt2.gif\";
chr4off = new Image();
chr4off.src =\"../images/knap/kontakt.gif\";
}
function img_act(imgName) {
if (version == \"n3\") {
imgOn = eval(imgName + \"on.src\");
document [imgName].src = imgOn;
}
}
function img_inact(imgName) {
if (version == \"n3\") {
imgOff = eval(imgName + \"off.src\");
document [imgName].src = imgOff;
}
}
// -->
</script>
</HEAD>
<BODY>
<TABLE WIDTH=\"100%\" BORDER=\"0\" BGCOLOR=\"#FFFFFF\" CELLSPACING=\"1\">
<TR ALIGN=\"center\">
<TD WIDTH=\"150\" BGCOLOR=\"#FFFFFF\"><a href=\"http://www.danmark.dk\" onMouseover=\"img_act(\'chr1\')\" onMouseout=\"img_inact(\'chr1\')\"><IMG SRC=\"../images/knap/forside.gif\" BORDER=\"0\" WIDTH=\"120\" HEIGHT=\"15\" ALIGN=\"bottom\" ALT=\"Besøg: http://www.danmark.dk\" name=\"chr1\"></a></TD>
<TD WIDTH=\"150\" BGCOLOR=\"#FFFFFF\"><a href=\"http://www.england.dk\" onMouseover=\"img_act(\'chr2\')\" onMouseout=\"img_inact(\'chr2\')\"><IMG SRC=\"../images/knap/produkt.gif\" BORDER=\"0\" WIDTH=\"120\" HEIGHT=\"15\" ALIGN=\"bottom\" ALT=\"Besøg: http://www.england.dk\" name=\"chr2\"></a></TD>
<TD WIDTH=\"150\" BGCOLOR=\"#FFFFFF\"><a href=\"http://www.england.dk\" onMouseover=\"img_act(\'chr3\')\" onMouseout=\"img_inact(\'chr3\')\"><IMG SRC=\"../images/knap/ref.gif\" BORDER=\"0\" WIDTH=\"120\" HEIGHT=\"15\" ALIGN=\"bottom\" ALT=\"Besøg: http://www.england.dk\" name=\"chr3\"></a></TD>
<TD WIDTH=\"150\" BGCOLOR=\"#FFFFFF\"><a href=\"http://www.england.dk\" onMouseover=\"img_act(\'chr4\')\" onMouseout=\"img_inact(\'chr4\')\"><IMG SRC=\"../images/knap/kontakt.gif\" BORDER=\"0\" WIDTH=\"120\" HEIGHT=\"15\" ALIGN=\"bottom\" ALT=\"Besøg: http://www.england.dk\" name=\"chr4\"></a></TD>
</TR>
</TABLE>
</BODY>
</HTML>
*****************************
Hvorfor virker den ikke i eks. 2
/1234567891