Avatar billede 1234567891 Nybegynder
01. januar 2001 - 17:01 Der er 6 kommentarer og
1 løsning

OnMouseOver menu

Hejsa

Jeg 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

Avatar billede emileej Nybegynder
01. januar 2001 - 17:14 #1
Denne kode virker (rettet version af din version 2):

<!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>

(du havde en tuborgparantes for meget)

E-)mil
Avatar billede engrob Nybegynder
01. januar 2001 - 17:14 #2
Jeg kunne godt få det til at virke hvis jeg bare fjernede en }

<!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>
Avatar billede emileej Nybegynder
01. januar 2001 - 17:21 #3
>> engrob

Æv bæv! Jeg kom først! ;)

E-)mil
Avatar billede engrob Nybegynder
01. januar 2001 - 17:26 #4
Øv

Men der er stadigvæk forskel i koden, men hvis din virker må du nok desværre få pointsene (Hvordan staver man egentlig tíl point i bestemt flertal??)
(o:
Avatar billede 1234567891 Nybegynder
01. januar 2001 - 17:33 #5
emileej -> mange tak :o)
engrob -> jeg tror den bestemte form af point i flertal bare hedder point eller pointene
Avatar billede emileej Nybegynder
01. januar 2001 - 17:39 #6
>>1234567891

:)
Avatar billede emileej Nybegynder
02. januar 2001 - 16:20 #7
>>engrob

30 sek :)

E-)mil
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester