Bug in HTML file für Winterboard

Seit 2004 hat sich viel getan, der iPod per se ist nicht mehr up-to-date, so wie dieses Forum. Um die Informationen nicht zu verlieren ist das Forum jetzt Read-Only für Gäste, Registrierungen sind aufgrund der hohen Anzahl an Spam-Accounts nichts mehr möglich. Vielen Dank für die schöne Zeit an alle aktiven Nutzer!

  • Bug in HTML file für Winterboard

    Ich habe in folgendem HTML file den Bug, das ich statt einem 2 Wallpaper habe.
    Bloß wie bekomme ich das rechte weg????

    HTML-Quellcode

    1. <html>
    2. <head><title>newclock</title></head>
    3. <style>
    4. SPAN#clock
    5. {
    6. font-family: Helvetica;
    7. font-weight: ;
    8. color: white;
    9. font-size: 35px;
    10. text-shadow: #000000 1px 2px 1px;
    11. }
    12. SPAN#ampm
    13. {
    14. font-family: Helvetica;
    15. color: #transparent;
    16. font-size: 15px;
    17. text-shadow: #000000 1px 2px 1px;
    18. }
    19. SPAN#calendar
    20. {
    21. font-family: Helvetica;
    22. font-weight: ;
    23. text-align: center;
    24. color: white;
    25. text-shadow: #000000 1px 2px 1px;
    26. }
    27. </style>
    28. <script type="text/javascript">
    29. function init ( )
    30. {
    31. timeDisplay = document.createTextNode ( "" );
    32. document.getElementById("clock").appendChild ( timeDisplay );
    33. }
    34. function updateClock ( )
    35. {
    36. var currentTime = new Date ( );
    37. var currentHours = currentTime.getHours ( );
    38. var currentMinutes = currentTime.getMinutes ( );
    39. var currentSeconds = currentTime.getSeconds ( );
    40. // Pad the minutes and seconds with leading zeros, if required
    41. currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
    42. currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
    43. // Choose either "AM" or "PM" as appropriate
    44. var timeOfDay = ( currentHours < 24 ) ? "AM" : "PM";
    45. // Convert the hours component to 24-hour format if needed
    46. currentHours = ( currentHours > 24 ) ? currentHours - 24 : currentHours;
    47. // Convert an hours component of "0" to "24"
    48. currentHours = ( currentHours == 24 ) ? 0 : currentHours;
    49. // Compose the string for display
    50. var currentTimeString = currentHours + ":" + currentMinutes;
    51. // Update the time display
    52. document.getElementById("clock").firstChild.nodeValue = currentTimeString;
    53. }
    54. function init2 ( )
    55. {
    56. timeDisplay = document.createTextNode ( "" );
    57. document.getElementById("ampm").appendChild ( timeDisplay );
    58. }
    59. function amPm ( )
    60. {
    61. var currentTime = new Date ( );
    62. var currentHours = currentTime.getHours ( );
    63. // Choose either "AM" or "PM" as appropriate
    64. var timeOfDay = ( currentHours < 24 ) ? "" : "";
    65. // Convert the hours component to 24-hour format if needed
    66. currentHours = ( currentHours > 24 ) ? currentHours - 24 : currentHours;
    67. // Convert an hours component of "0" to "24"
    68. currentHours = ( currentHours == 24 ) ? 0 : currentHours;
    69. // Compose the string for display
    70. var currentTimeString = timeOfDay;
    71. // Update the time display
    72. document.getElementById("ampm").firstChild.nodeValue = currentTimeString;
    73. }
    74. function init3 ( )
    75. {
    76. timeDisplay = document.createTextNode ( "" );
    77. document.getElementById("calendar").appendChild ( timeDisplay );
    78. }
    79. function calendarDate ( )
    80. {
    81. var this_weekday_name_array = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag")
    82. var this_month_name_array = new Array("Januar","Februar","MŠrz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember") //predefine month names
    83. var this_date_timestamp = new Date()
    84. var this_weekday = this_date_timestamp.getDay()
    85. var this_date = this_date_timestamp.getDate()
    86. var this_month = this_date_timestamp.getMonth()
    87. var this_year = this_date_timestamp.getYear()
    88. if (this_year < 1000)
    89. this_year+= 1900;
    90. if (this_year==101)
    91. this_year=2001;
    92. document.getElementById("calendar").firstChild.nodeValue = this_weekday_name_array[this_weekday] + ", " + this_date + ". " + this_month_name_array[this_month] + " " + this_year //concat long date string
    93. }
    94. </script>
    95. </head>
    96. </style>
    97. </head>
    98. <body>
    99. <img id="img1" class="fade-in">
    100. <img id="img2" class="fade-out">
    101. <script>
    102. // By Mk321024 <mk321024@yahoo.com>
    103. var interval = 15; // Seconds between change (must be > duration)
    104. var imageDir = "./Wallpapers/";
    105. var duration = 3;
    106. var images = [
    107. "1.png",
    108. "2.png",
    109. "3png",
    110. "4.png",
    111. "5.png",
    112. "6.png",
    113. "7.png",
    114. "8.png",
    115. "9.png",
    116. "10.png",
    117. "11.png",
    118. "12.png",
    119. "13.png",
    120. "14.png",
    121. ];
    122. //// Hier musst man nichts mehr ändern :) ////
    123. var index = 0;
    124. var imageCount = images.length;
    125. var randomize = function(){
    126. return Math.round(5 - 10 * Math.random());
    127. };
    128. var fade = function(){
    129. img1.style.zIndex = 1;
    130. img2.style.zIndex = 2;
    131. img1.className = "fade-in";
    132. img2.className = "fade-out";
    133. index = (index + 1) % imageCount;
    134. if(!index){
    135. images.sort(randomize);
    136. }
    137. var tmp = img1;
    138. img1 = img2;
    139. img2 = tmp;
    140. setTimeout(function(){img1.src = imageDir + images[index];}, duration * 1000);
    141. setTimeout(fade, interval * 1000);
    142. };
    143. images.sort(randomize);
    144. img1.src = imageDir + images[index];
    145. fade();
    146. </script>
    147. <table style="position: absolute; top: 0px; left: 0px; width: 320px; height: 130px;" cellspacing="0" cellpadding="0" align="center">
    148. <tr align="center" valign="top" border="0" cellpadding="0">
    149. <td width="320" height="130" background="ClockBar.png" valign="top">
    150. </td>
    151. </tr>
    152. </table>
    153. <table style="position: absolute; top: 32px; left: 0px; width: 320px; height: 461px;" cellspacing="0" cellpadding="0" align="center">
    154. <tr align="center" valign="top" border="0" cellpadding="0">
    155. <td height="10" valign="top">
    156. <span id="clock">
    157. <script language="JavaScript">updateClock(); setInterval('updateClock()', 1000 )</script></span><span id="ampm">
    158. <script language="JavaScript">amPm(); setInterval('amPm()', 1000 )</script>
    159. </span>
    160. </td>
    161. </tr>
    162. <tr align="center">
    163. <td id="date" valign="top" halign="center">
    164. <span id="calendar">
    165. <script language="JavaScript">calendarDate(); setInterval('calendarDate()', 1000 )</script>
    166. </span>
    167. </td>
    168. </tr>
    169. </table>
    170. </body>
    171. </html>
    Alles anzeigen