Avatar billede theselfimages Nybegynder
22. november 2004 - 18:53 Der er 1 løsning

DIV script med NS7 problem.

Dette script placerer random 1 af 4 billeder bestående af to elementer på forsiden af www.walsted.dk

Der syntes dog at være et problem med korrekt placering i Netscape 7.x + IE på MAC. Kan DIV struktur optimeres for at afhjælpe dette?

    <script type="text/javascript">
    var num = Math.ceil(Math.random()*4);
    if (Math.round(num)==4) {
      document.write('<td style="position:relative;top:0px;left:0px;z-index: 10;"><div id="skjulDiv"><div style="position:absolute;margin-top:12px;margin-left:425px;"><img border="0" src="images/front/top4.jpg" width="70" height="125"></div><div style="position:absolute;margin-top:137px;margin-left:0px;"><img border="0" src="images/front/main4.jpg" width="770" height="465"></div><div style="position:absolute;margin-top:205px;margin-left:-219px;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="500" HEIGHT="50"><PARAM NAME=movie VALUE="images/flash/frise.swf"><PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=best><PARAM NAME=wmode VALUE=transparent><EMBED SRC="images/flash/frise.swf" MENU=false QUALITY=best WIDTH="500" HEIGHT="50" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT></div></div></td>');
    } else {
      document.write('<td style="position:relative;top:0px;left:0px;z-index: 10;"><div id="skjulDiv"><div style="position:absolute;margin-top:12px;margin-left:474px;"><img border="0" src="images/front/top' + num + '.jpg" width="70" height="125"></div><div style="position:absolute;margin-top:137px;margin-left:0px;"><img border="0" src="images/front/main' + num + '.jpg" width="770" height="465"></div><div style="position:absolute;margin-top:205px;margin-left:-219px;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="500" HEIGHT="50"><PARAM NAME=movie VALUE="images/flash/frise.swf"><PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=best><PARAM NAME=wmode VALUE=transparent><EMBED SRC="images/flash/frise.swf" MENU=false QUALITY=best WIDTH="500" HEIGHT="50" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT></div></div></td>');
    }
    </script>
Avatar billede theselfimages Nybegynder
19. december 2004 - 00:16 #1
Spørgsmålet lukkes.
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