Results 1 to 2 of 2

Thread: FadeinSlideshow blocades Date & Time script

  1. #1
    Join Date
    Jan 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default FadeinSlideshow blocades Date & Time script

    hi,

    I've a problem with the "FadeinSlideshow-script". In my website there are
    these two scripts. A Date & Time script in the <head>:
    <script language="JavaScript">
    <!--
    // Array für dynamische und statische Darstellungen
    DayName = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");


    // :::::::::::::::::::::::::::::::::::::::::::::::::::
    // Funktionen für Anzeigen Tag Datum + dynamische Uhrzeit
    function DisplayTime()
    {

    var SysDate = new Date();
    var Day = SysDate.getDate();
    var MonthNow = SysDate.getMonth() + 1;
    var YearNow = SysDate.getYear();
    var HoursNow = SysDate.getHours();
    var MinuteNow = SysDate.getMinutes();
    var Seconds = SysDate.getSeconds();
    var DOW = SysDate.getDay();

    // erste Stelle für zweistellige Anzeige bei einstelligem Ergebnis
    var firstDay = ((Day < 10) ? "0" : "");
    var firstMonth = ((MonthNow < 10) ? ".0" : ".");
    var firstHour = ((HoursNow < 10) ? "0" : "");
    var firstMinute = ((MinuteNow < 10) ? ":0" : ":");
    var firstSecond = ((Seconds < 10) ? ":0" : ":");

    // aktuelles Datum
    var DateNow = firstDay + Day + firstMonth + MonthNow + "." + YearNow;

    // aktuelle Zeit
    var TimeNow = firstHour + HoursNow + firstMinute + MinuteNow + firstSecond + Seconds + " Uhr";

    // Wochentag Datum Zeit
    var DispString = DayName[DOW] + " " + DateNow + " &nbsp;" + TimeNow;

    if (!document.layers && !document.all) return;
    if (document.layers) {
    document.layers.uhr.document.write(DispString);
    document.layers.uhr.document.close();
    }
    else
    if (document.all)
    uhr.innerHTML = DispString;
    setTimeout("DisplayTime()", 1000);
    }




    // :::::::::::::::::::::::::::::::::::::::::::::::::::
    // Funktionen für statische Anzeigen Tag Datum Uhrzeit


    function Berechnen()
    {
    var SystemDate = new Date();
    var Day = SystemDate.getDate();
    var MonthNow = SystemDate.getMonth() + 1;
    var YearNow = SystemDate.getYear();
    var HoursNow = SystemDate.getHours();
    var MinuteNow = SystemDate.getMinutes();
    var Seconds = SystemDate.getSeconds();
    var DayOfWeek = SystemDate.getDay();
    DOW = SystemDate.getDay();

    // für zweistellige Anzeige
    var firstDay = ((Day < 10) ? "0" : "");
    var firstMonth = ((MonthNow < 10) ? ".0" : ".");
    var firstHour = ((HoursNow < 10) ? "0" : "");
    var firstMinute = ((MinuteNow < 10) ? ":0" : ":");
    var firstSecond = ((Seconds < 10) ? ":0" : ":");

    // aktuelles Datum
    DateString= firstDay + Day + firstMonth + MonthNow + "." + YearNow;
    // aktuelle Zeit
    TimeString= firstHour + HoursNow + firstMinute + MinuteNow + firstSecond + Seconds;
    // Wochentag Datum Zeit
    WholeString = DayName[DayOfWeek] + " " + DateString + " &nbsp;" + TimeString;
    }

    // nur Datum
    function DatumSchreiben() {
    Berechnen();
    document.write(DateString);
    return
    }

    // nur Zeit (statisch)
    function ZeitSchreiben() {
    Berechnen();
    document.write(TimeString + " Uhr");
    return
    }

    // Tag + Datum + Zeit (statisch)
    function AllesSchreiben() {
    Berechnen();
    document.write(WholeString);
    return
    }

    // nur Wochentag
    function WochentagSchreiben() {
    Berechnen();
    document.write(DayName[DOW]);
    return
    }


    // -->
    </script>
    <style type="text/css">
    <!--
    .uhr {
    font-family:verdana;
    font-size:9px;
    color:#3d3d5d;
    position:absolute;left:20;top:152;
    }
    -->
    </style>

    and this in the <body>

    <body bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0" onLoad="window.setTimeout('DisplayTime()',1000);">
    <div id="uhr" class="uhr" style=" position: absolute; top: 280px; left: 126px; visibility: visible"></div>

    The Slideshowscript is embedded in a layer and works!

    But what's the problem with this Date & Time script?
    Without the slideshow the Date & Time script works.

    Thanx for help

    Bernd

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi, there's a link in my signature about how to deal with multiple scripts on one page.
    These queries are very time consuming, and are not usually dealt with very quickly.

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •