HTML Code Fehler... HILFE!!!

Diskutiere HTML Code Fehler... HILFE!!! im Netzwerk, Router, WLAN, Internet, Telefonie Forum im Bereich Sonstige Hardware Themen; <BODY LINK="#FFFFFF" TEXT="FFFFFF" VLINK="#999999" ALINK="#00FF00" BGCOLOR="#000000" onLoad="fix=setTimeout(&#39;mill()&#39;,1000); setTimeout(&#39;pre()&#39;,1021)" onUnload="clearTimeout(fix)" > &nbsp;<CENTER> &#60;script LANGUAGE="JavaScript"> &#60;&#33;--// hide script from older bowsers // written by Steven M. Bloomfield ...



 
  1. HTML Code Fehler... HILFE!!! #1
    Senior Mitglied Standardavatar

    Standard

    <BODY LINK="#FFFFFF" TEXT="FFFFFF" VLINK="#999999" ALINK="#00FF00" BGCOLOR="#000000" onLoad="fix=setTimeout(&#39;mill()&#39;,1000); setTimeout(&#39;pre()&#39;,1021)" onUnload="clearTimeout(fix)" >
    &nbsp;<CENTER>
    &#60;script LANGUAGE="JavaScript">
    &#60;&#33;--// hide script from older bowsers
    // written by Steven M. Bloomfield
    // webmaster@creative.xtml.co.uk
    // copyright 1998&nbsp; XTML Creative Ltd.
    //
    // The coding below is the nastiest you will ever see, as I am very rusty and have always been a messy abstract programmer
    // all i&#39;m bothered about is that it works
    //
    // If you use this code, please put a link back to Virtual Manchester http://www.manchester.com
    //&nbsp;

    //Turn off erroneous error messages for Netscape v2.0x
    window.onerror=null;

    var fix;

    //Netscape MakeArray function
    function MakeArray(n) {
    &nbsp; for (var i = 0; i <= n-1; i++) {
    &nbsp; &nbsp; this[i] = 0 }
    &nbsp; &nbsp; return this
    }
    // Define path to images
    path = "images/";

    //Create the background image filename array
    num = new MakeArray(10);

    num[0] = new Image(25,25);
    num[1] = new Image(25,25);
    num[2] = new Image(25,25);
    num[3] = new Image(25,25);
    num[4] = new Image(25,25);
    num[5] = new Image(25,25);
    num[6] = new Image(25,25);
    num[7] = new Image(25,25);
    num[8] = new Image(25,25);
    num[9] = new Image(25,25);

    function pre() {
    // Pre-load the digit images
    num[0].src = path + "0.gif";
    num[1].src = path + "1.gif";
    num[2].src = path + "2.gif";
    num[3].src = path + "3.gif";
    num[4].src = path + "4.gif";
    num[5].src = path + "5.gif";
    num[6].src = path + "6.gif";
    num[7].src = path + "7.gif";
    num[8].src = path + "8.gif";
    num[9].src = path + "9.gif";

    // Define the previous time digits
    da1 = 0;
    da2 = 0;
    da3 = 0;
    h1 = 0;
    h2 = 0;
    m1 = 0;
    m2 = 0;
    s1 = 0;
    s2 = 0;

    // Change all images to zero
    da1.src = num[0].src
    da2.src = num[0].src
    da3.src = num[0].src
    document.hours1.src = num[0].src
    document.hours2.src = num[0].src
    document.min1.src = num[0].src
    document.min2.src = num[0].src
    document.sec1.src = num[0].src
    document.sec2.src = num[0].src

    // Start the clock
    clock();
    }

    function mill()
    {

    today=new Date();
    millennium=new Date(2003,06,18,11,00,00);

    if (today.getTime() < millennium)
    &nbsp; {
    &nbsp; difference = millennium - today.getTime();
    &nbsp; secs = Math.floor(difference / (1000));
    &nbsp; mins = Math.floor(difference / (1000 * 60));
    &nbsp; hours = Math.floor(difference / (1000 * 60 *60));
    &nbsp; days = Math.floor(difference / (1000 * 60 * 60 * 24));
    &nbsp; minny = mins * 60;
    &nbsp; houry = hours *60;
    &nbsp; dayey = days *24;
    &nbsp; edit = secs - minny;
    &nbsp; edit2 = mins -houry;
    &nbsp; edit3 = hours - dayey;
    &nbsp; fix=setTimeout(&#39;mill()&#39;,1000);
    &nbsp; }
    }


    // Extract the two digits for the given time element (d1=tens d2=units)
    function getDigits(timeElement) {
    // If less than 10 then first digit is 0
    if (eval(timeElement) <=9) {
    &nbsp; d1 = 0;
    &nbsp; d2 = eval(timeElement);
    }
    else {
    // The function parseInt truncates a number
    &nbsp; d1 = eval(parseInt(timeElement/10));
    &nbsp; d2 = eval(timeElement - 10*d1);
    }
    }



    // Extract the two digits for the given time element (d1=tens d2=units)
    function getDigity(timeElement) {
    //If less than 10 then first digit is 0
    if (eval(timeElement) <=9) {
    &nbsp; d1 = 0;
    &nbsp; d2 = eval(timeElement);
    &nbsp; d3 = eval(timeElement);
    }
    else {
    // The function parseInt truncates a number
    &nbsp; d1 = eval(parseInt(timeElement/100));
    &nbsp; d22 = eval(timeElement - 100*d1);
    &nbsp; d2 = eval(parseInt(d22/10));
    &nbsp; d3 = eval(d22 - 10*d2);
    }
    }

    function clock() {

    // Get the days digits
    getDigity(days);
    // Check if changed

    if (d3 &#33;= da3) {
    &nbsp; document.day3.src = num[d3].src;
    &nbsp; da3 = d3;
    }
    if (d2 &#33;= da2) {
    &nbsp; document.day2.src = num[d2].src;
    &nbsp; da2 = d2;
    }
    if (d1 &#33;= da1) {
    &nbsp; document.day1.src = num[d1].src;
    &nbsp; da1 = d1;
    &nbsp; &nbsp; }

    // Get the hours digits
    getDigits(edit3);
    // Check if changed
    if (d2 &#33;= h2) {
    &nbsp; document.hours2.src = num[d2].src;
    &nbsp; h2 = d2;
    }
    if (d1 &#33;= h1) {
    &nbsp; document.hours1.src = num[d1].src;
    &nbsp; h1 = d1;
    }


    // Get the minutes digits
    getDigits(edit2);
    if (d2 &#33;= m2) {
    &nbsp; document.min2.src = num[d2].src;
    &nbsp; m2 = d2;
    }
    if (d1 &#33;= m1) {
    &nbsp; document.min1.src = num[d1].src;
    &nbsp; m1 = d1;
    }
    // Get the seconds digits
    getDigits(edit);
    if (d2 &#33;= s2) {
    &nbsp; document.sec2.src = num[d2].src;
    &nbsp; s2 = d2;
    }
    if (d1 &#33;= s1) {
    &nbsp; document.sec1.src = num[d1].src;
    &nbsp; s1 = d1;
    }
    // Wait 0.2 seconds and do it again
    timerID = setTimeout("clock()",200);
    }


    // --&#62;
    </SCRIPT>
    &#60;&#33;-- format page to 500 pixels --&#62;
    <TABLE WIDTH=500 BORDER=0><TR><TD>

    &#60;&#33;-- millennium counter --&#62;



    <CENTER>
    <table BORDER=0 CELLPADDING=0 CELLSPACING=0>
    <TR>
    <TD>[img]images/0.gif[/img][img]images/0.gif[/img][img]images/0.gif[/img][img]images/seperate.gif[/img]</TD>
    <TD>[img]images/0.gif[/img][img]images/0.gif[/img][img]images/seperate.gif[/img]</TD>
    <TD>[img]images/0.gif[/img][img]images/0.gif[/img][img]images/seperate.gif[/img]</TD>
    <TD>[img]images/0.gif[/img][img]images/0.gif[/img]</TD>
    </TR>
    <TR>
    <TD ALIGN=CENTER><FONT FACE="arial" SIZE=1 COLOR="#FFFFFF">Tage</FONT></TD>
    <TD ALIGN=CENTER><FONT FACE="arial" SIZE=1 COLOR="#FFFFFF">Std</FONT></TD>
    <TD ALIGN=CENTER><FONT FACE="arial" SIZE=1 COLOR="#FFFFFF">Min</FONT></TD>
    <TD ALIGN=CENTER><FONT FACE="arial" SIZE=1 COLOR="#FFFFFF">Sek</FONT></TD>
    </TR>
    </TABLE>

    </TD></TR></TABLE>
    </CENTER>
    </BODY>&#60;&#33;--webbot bot="HTMLMarkup" endspan i-checksum="58867" --&#62;</p>
    In dem Code oben ist ein Java Script verfasst, der einen animierten Countdown darstellt... leider ist ein Fehler aufgetreten, wenn der Countdown unter 10 Tage geht, werden nicht zB 009 Tage 20h 14min 30sek angezeigt, sondern 099 Tage....

    ennt sich irgendwer mit HTML aus und kann mir dsagen wo der Fehler liegt...??&#33;&#33;

    Hab den Countdown irgendwioe runtergeladen, weiss aber net mehr wo... :8 War schon länger her, bis ich jetzt mit dem Countdown merkte, dass es diesen Fehler gibt

  2. Standard

    Hallo Nightmare10,

    schau Dir mal Diesen Ratgeber. an. Dort wirst du bestimmt fündig.
    Registrieren bzw. einloggen, um diese und auch andere Anzeigen zu deaktivieren
  3. HTML Code Fehler... HILFE!!! #2
    Forum Stammgast Avatar von BastiKiller27

    Mein System
    BastiKiller27's Computer Details
    CPU:
    AMD64 3000+
    Mainboard:
    Asus A8N-Sli
    Arbeitsspeicher:
    2GB MDT PC-400
    Festplatte:
    2x 160GB Hitachi
    Grafikkarte:
    Albatron 7800gt
    Soundkarte:
    Audigy 4
    Monitor:
    Samsung SyncMaster 172x
    Betriebssystem:
    Debian/Etch

    Standard

    If you use this code, please put a link back to Virtual Manchester http://www.manchester.com
    hast du ihn wieleicht dort runtergeladen ?

  4. HTML Code Fehler... HILFE!!! #3
    Senior Mitglied
    Threadstarter
    Standardavatar

    Standard

    heh... nee
    da find ich den net


HTML Code Fehler... HILFE!!!

Besucher kamen mit folgenden Begriffen auf die Seite:

// Define the previous time digits

Stichworte


Guides, Tipps und Mitspieler zu Citadel: Forged with Fire findest du auf Citadel Forum - Forged with Fire.
-
Trete der Nintendo Community bei und besuche das Nintendo Switch Forum.