dixo: binsch blind ? *g*

Hi Leute :).. ich weiss auch nicht aber ich find den fehler einfach net.. sieht ihn vielleicht jemand ? .. wäre sehr hilfreich .. dankeee

<html>
<head>
<script language="JavaScript">

function Zoom(u, w, h)
{
Fenster1 = window.open('about:blank','Zoom','scrollbars=yes,toolbar=no,menubar=no,top=0,left=0,width=' + w + ', height=' + h);
Fenster1.document.open();
Fenster1.document.writeln('<hmtl><head><title>Zoom</title><style type="text/css">
body {margin-left: 0px; margin-top: 0px;vmargin-right: 0px; margin-bottom: 0px;}
</style></head>');
Fenster1.document.writeln('<body bgcolor="#201814"><img src='+ u +' width="' + w + '" height="'+ b +'">');
Fenster1.document.writeln('</body></html>');

}
</script>
</head>
<body><a href='javascript:onclick=Zoom("images/room3.jpg", 200, 200)'>Test</a>
</body>
</html>

  1. Hallo Dixo,

    <script language="JavaScript">

    type-Attribut fehlt.

    Fenster1 = window.open('about:blank','Zoom','scrollbars=yes,toolbar=no,menubar=no,top=0,left=0,width=' + w + ', height=' + h);

    Das Leerzeichen vor height ist zuviel.

    Fenster1.document.writeln('<hmtl><head><title>Zoom</title><style type="text/css">
    body {margin-left: 0px; margin-top: 0px;vmargin-right: 0px; margin-bottom: 0px;}
    </style></head>');

    Stammt dieser Zeilenumbruch von dir?

    Fenster1.document.writeln('<body bgcolor="#201814"><img src='+ u +' width="' + w + '" height="'+ b +'">');

    Warum verwendest Du für die Hintergrundfarbe nicht auch CSS? Ausserdem fehlen die Anführungszeichen bei src=...

    Was geht denn eigentlich nicht (Fehlermeldung)?

    Grüße
    Andreas

    --
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
    (Rich Cook)
    1. Nochwas,

      body {margin-left: 0px; margin-top: 0px;vmargin-right: 0px; margin-bottom: 0px;}

      Ein v zuviel.

      Grüße
      Andreas

      --
      "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
      (Rich Cook)
      1. Mh ja habs mittlerweile hinbekommen.. paar Fehler sind durchs rumprobieren und ständige ändern entstanden.. aber das Hauptproblem war eigentlich das ich als Parameter h gewählt hatte und unten b eingetragen hab *g*.. :D

        also das Script soll bei einem Klick auf einen Link ein neues Fenster öffnen in dem ein Bild groß dargestellt wird, dafür hab ich nicht nur ein Popup benutzt weil ich dann immer den Standart-Rand im IE hab wenn ich nur ein JPG öffne... und so passt es genau in das Fenster (ohne Scrollbalken.. richtig Größe)..

        Hier nochmal das funktionierende Script:

        <html>
        <head>
        <script language="JavaScript">

        function Zoom(u, w, h)
        {
        Fenster1 = window.open("about:blank","Zoom","scrollbars=no,toolbar=no,menubar=no,top=0,left=0,width=" + w + ", height=" + h);
        Fenster1.focus();
        Fenster1.document.open();
        Fenster1.document.writeln('<hmtl><head><title>Zoom</title><style type="text/css">');
        Fenster1.document.writeln('body {margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;}');
        Fenster1.document.writeln('</style></head>');
        Fenster1.document.writeln('<body bgcolor="#201814"><img src='+ u +' width="' + w + '" height="'+ h +'">');
        Fenster1.document.writeln('</body></html>');

        }
        </script>
        </head>
        <body><a href="javascript:onclick=Zoom('images/room3.jpg', 200, 200)">Test</a>
        </body>
        </html>

        1. Hallo!

          <a href="javascript:onclick=Zoom('images/room3.jpg', 200, 200)">Test</a>

          Wenn du dir jetzt noch http://molily.de/javascript-popups ansiehst, haben Benutzer ohne JS auch bessere Karten ;-)

          mfg Alfie

  2. Hi dixo,

    Hi Leute :).. ich weiss auch nicht aber ich find den fehler einfach net.. sieht ihn vielleicht jemand ?

    Nein. Liegt wahrscheinlich daran, dass du keinen Fehler gepostet hast, sondern nur dein Skript (oder binsch blind? *g*).

    Also schreib mal bitte was es macht, bzw. was es nicht macht.

    Ansonsten:

    Fenster1.document.writeln('<body bgcolor="#201814"><img src='+ u +' width="' + w + '" height="'+ b +'">');

    kann es sein, dass die " bei width und height zuviel sind?

    MfG,
    Arthur

    --
    << So long and thanks for all the fish... >>