 |
| Hinweise |
Willkommen im TP-Hilfe-Forum!Dies ist ein Forum zu den Themen Photoshop, Dreamweaver, Flash, Selbständigkeit und mehr, in dem Du Hilfe, Anleitung oder eine Lösung zu Deinen Problemen erhältst. Aktuell bist Du in unseren Foren als Gast mit reinen Leserechten unterwegs. Wenn Du Dich registrierst, kannst Du eigene Themen verfassen, deine Frage stellen und privat mit anderen TPlern kommunizieren. Weitere Foren werden zugänglich, und Du wirst – falls gewünscht – per Mail über neue Beiträge informiert. Die Registrierung ist schnell und kostenlos. Sollten bei der Registrierung Fragen auftauchen, reicht ein Klick in unsere Hilfe - Häufig gestellte Fragen oder eine kurze Mitteilung an das Support-Team. Viel Spaß bei Traum-Projekt.com |
20.08.2003, 19:46
|
#1
|
|
TP-Special Mod
Registriert seit: May 2001
Ort: Arnsberg - Sauerland
|
??? scrollable area funzt nach Einbau eines js-countdown nicht mehr
Hi,
habe eben mal in unsere Festival-Site einen js-Countdown-Zähler eingebaut (von ner Heft CD)
funzt auch einwandfrei ( klick)
aber: die scrollable area von PVII, mit der ich den News-Kasten in der linken Spalte realisiert habe, steigt dann aus
ohne Countdown-Zähler läuft die scrollable area einwandfrei ( klick)
woran kann das liegen, wie schaffe ich Abhilfe?
|
|
|
20.08.2003, 19:53
|
#2
|
|
TP-Moderator
Registriert seit: Mar 2002
Ort: Landau, Palatinate, Germany
|
Sieht irgendwie so aus, als wär ne Variable 2x vergeben... ich komm aber mit dem QT nich klar...
|
|
|
20.08.2003, 19:58
|
#3
|
|
TP-Special Mod
Registriert seit: May 2001
Ort: Arnsberg - Sauerland
|
Zitat:
Original geschrieben von -Andreas-
... ich komm aber mit dem QT nich klar...
|
ok, hier mal der relevante code getrennt:
countdown-Zähler:
PHP-Code:
<script language="JavaScript1.2">
/*
Dynamic countdown Script- © Dynamic Drive ([url]www.dynamicdrive.com[/url])
For full source code, 100's more DHTML scripts, and TOS,
visit [url]http://www.dynamicdrive.com[/url]
*/
function setcountdown(theyear,themonth,theday){
yr=theyear;mo=themonth;da=theday
}
//////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////
//STEP 1: Configure the countdown-to date, in the format year, month, day:
setcountdown(2003,08,29)
//STEP 2: Change the two text below to reflect the occasion, and message to display on that occasion, respectively
var occasion="under the bridge Festival 2003!"
var message_on_occasion="Viel Spaß - kommt in Scharen!!"
//STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countdown area
var countdownwidth='320px'
var countdownheight='40px'
var countdownbgcolor='#181CB0'
var opentags='<font face="Verdana" size="2"><normal>'
var closetags='</normal></font>'
//////////DO NOT EDIT PASS THIS LINE//////////////////
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var crosscount=''
function start_countdown(){
if (document.layers)
document.countdownnsmain.visibility="show"
else if (document.all||document.getElementById)
crosscount=document.getElementById&&!document.all?document.getElementById("countdownie") : countdownie
countdown()
}
if (document.all||document.getElementById)
document.write('<span id="countdownie" style="width:'+countdownwidth+'; background-color:'+countdownbgcolor+'"></span>')
window.onload=start_countdown
function countdown(){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todayh=today.getHours()
var todaymin=today.getMinutes()
var todaysec=today.getSeconds()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
futurestring=montharray[mo-1]+" "+da+", "+yr
dd=Date.parse(futurestring)-Date.parse(todaystring)
dday=Math.floor(dd/(60*60*1000*24)*1)
dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
//if on day of occasion
if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+message_on_occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+message_on_occasion+closetags
return
}
//if passed day of occasion
else if (dday<=-1){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+"Occasion already passed! "+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+"Occasion already passed! "+closetags
return
}
//else, if not yet
else{
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " Tage, "+dhour+" Stunden, "+dmin+" Minuten, und "+dsec+" Sekunden bis zum "+occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+dday+ " Tage, "+dhour+" Stunden, "+dmin+" Minuten, und "+dsec+" Sekunden bis zum "+occasion+closetags
}
setTimeout("countdown()",1000)
}
</script>
und der scrollable layer:
PHP-Code:
<!-- begin absolutely positioned scrollable area object-->
</p>
<div id="divUpControl"> <a href="javascript:;" onMouseOver="PerformScroll(-7);MM_swapImage('up','','2003/bilder/up_2.gif',1)" onMouseOut="CeaseScroll();MM_swapImgRestore()" onFocus="if(this.blur)this.blur()"><img src="2003/bilder/up_1.gif" width="17" height="20" border="0" name="up" alt="nach oben scrollen" title="nach oben scrollen"></a> </div>
<div id="divDownControl"> <a href="javascript:;" onMouseOver="PerformScroll(7);MM_swapImage('down','','2003/bilder/down_2.gif',1)" onMouseOut="CeaseScroll();MM_swapImgRestore()" onFocus="if(this.blur)this.blur()"><img src="2003/bilder/down_1.gif" width="17" height="20" border="0" alt="nach unten scrollen" name="down" title="nach unten scrollen"></a> </div>
<div id="divContainer">
<div id="divContent">
<p class="klein10"><i>17.08.2003:</i><br>
neue Umfrage <b><br>
<a href="index.php" onFocus="if(this.blur)this.blur()">> gestartet </a></b></p>
<p class="klein10"><i>15.08.2003:</i><br>
die Details zu unserem <b><a href="2003/programm_details.php#sonntag" onFocus="if(this.blur)this.blur()">> Sonntags-Programm </a></b> sind endlich online</p>
<p class="klein10"><i>05.08.2003:</i><br>
Banner und Logos zum Download unten auf unserer <b><a href="2003/links.php" onFocus="if(this.blur)this.blur()">> Linkseite </a></b></p>
<p class="klein10"><i>01.08.2003:</i><br>
Pressetexte stehen zum Download in unserem <b><br>
<a href="presse/index.php" onFocus="if(this.blur)this.blur()">> Pressebereich </a></b></p>
<p class="klein10"><i>24.07.2003:</i><br>
der Vorverkauf hat begonnen! <b><a href="2003/tickets.php" onFocus="if(this.blur)this.blur()">> alle Infos dazu </a></b></p>
<p class="klein10"><i>21.07.2003:</i><br>
komplett: alle Bandfotos in Druckqualität zum Download im <b><br>
<a href="presse/index.php" onFocus="if(this.blur)this.blur()">> Pressebereich </a></b></p>
<p class="klein10"><i>03.07.2003:</i><br>
nach langer Pause dieses Jahr wieder <b><br>
<a href="http://www.kalkofen2003.de/" target="_blank" onFocus="if(this.blur)this.blur()">> KALKOFEN-Festival </a></b> in Warstein-Allagen</p>
<p class="klein10"><i>02.07.2003:</i><br>
damit ihr uns auch findet, <b><a href="2003/wegbeschreibung.php" onFocus="if(this.blur)this.blur()">> hier die Wegbeschreibung </a></b> zum Festival</p>
<p class="klein10"><i>27.05.2003:</i><br>
unser <b><a href="2003/programm.php" onFocus="if(this.blur)this.blur()">> Sonntags-Programm </a></b> 'steht'</p>
<p class="klein10"><i>19.05.2003:</i><br>
die <b><a href="2003/tickets.php" onFocus="if(this.blur)this.blur()">> Eintrittspreise 2003 </a></b> stehen fest</p>
<p class="klein10"><i>24.04.2003:</i><br>
under the bridge Festival kooperiert mit <b><br>
<a href="http://www.kulturattac.de" target="_blank" onFocus="if(this.blur)this.blur()">
> kulturattac</a></b></p> <p class="klein10"><i>18.04.2003:</i><br>
der <b><a href="presse/index.php" onFocus="if(this.blur)this.blur()">> Pressebereich </a></b> (Downloads)
ist eingerichtet</p>
<p class="klein10"><i>06.04.2003:</i><br>
unser <b><a href="2003/satzung.php" onFocus="if(this.blur)this.blur()">> Vorstand
und die Satzung </a></b> ist online</p>
<p class="klein10"><i>04.04.2003:</i><br>
wegen Server-Umzug sind wir heute einige Stunden nicht erreichbar :-(</p>
<p class="klein10"><i>31.03.2003:</i><br>
der <b><a href="2003/sponsoren.php" onFocus="if(this.blur)this.blur()">> nächste
Sponsor</a></b> ist gefunden</p>
<p class="klein10"><i>23.03.2003:</i><br>
unser <a href="2003/programm.php" onFocus="if(this.blur)this.blur()"><b>> Programm
2003</b></a> steht</p>
<p class="klein10"><i>21.03.2003:</i><br>
der <b><a href="2003/sponsoren.php" onFocus="if(this.blur)this.blur()">> erste
Sponsor</a></b> ist gefunden</p>
<p class="klein10"><i>17.03.2003:</i><br>
jetzt mit <b>utb-Umfrage</b></p>
<p class="klein10"><i>11.03.2003:</i><br>
they are back! <a href="http://www.collaps-goes-western.de" target="_blank" onFocus="if(this.blur)this.blur()">> <b>Collaps
Goes Western</b></a> - zumindest virtuell </p>
<p class="klein10"><i>09.03.2003:</i><br>
endlich ein neues<br>
<a href="gb/gb.php" onFocus="if(this.blur)this.blur()"> ><b> Gästebuch</b></a> </p>
<p class="klein10"><i>07.03.2003</i>:<br>
die nächste Band ist gefunden:<br>
<a href="http://www.supernichts.de" target="_blank" onFocus="if(this.blur)this.blur()">><b> Supernichts</b></a></p>
<p class="klein10"> <i>02.03.2003:</i><br>
<b>under the bridge 2003</b> ist online!</p>
</div>
</div> <!-- end absolutely positioned scrollable area object -->
|
|
|
20.08.2003, 20:40
|
#4
|
|
TP-Senior
Registriert seit: Aug 2003
Ort: Dresden
|
Guten Tag.
Ergänz mal das onLoad Verhalten im Body Tag mit start_countdown(); - also in etwa so:
Code:
<body blablabla onLoad="MM_preloadImages(blablabla); InitialiseScrollableArea(); start_countdown();">
Und im Gegenzug die Zeile 417 (glaub ich)
window.onload=start_countdown
mittels // auskommentieren. Sollte helfen.
Beste Grüße . . . Karsten
|
|
|
20.08.2003, 22:43
|
#5
|
|
TP-Special Mod
Registriert seit: May 2001
Ort: Arnsberg - Sauerland
|
| | |