Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript]Odliczanie + button
dk1342
post
Post #1





Grupa: Zarejestrowani
Postów: 275
Pomógł: 9
Dołączył: 24.07.2008
Skąd: Racibórz

Ostrzeżenie: (10%)
X----


Temat do usunięcia

Ten post edytował dk1342 20.10.2008, 14:26:55
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
dk1342
post
Post #2





Grupa: Zarejestrowani
Postów: 275
Pomógł: 9
Dołączył: 24.07.2008
Skąd: Racibórz

Ostrzeżenie: (10%)
X----


dzięki "pomógł" dla ciebie

wsadziłem to w php:

Kod
echo '
<input type="submit" id="1" onclick=\'parent.location.href="<?print(http://www.mojastrona.pl/pliki/test/files/" . $id . ");  ?>\'" value="Proszę czekać 10 sekund" />
<script type=\'text/javascript\'>
document.getElementById(\'1\').disabled = true;
var counter = 10;
function countdown(counter) {
counter--;
document.getElementById(\'1\').value = \'Proszę czekać \' + counter + \' sekund\';
if(counter == 0) {
document.getElementById(\'1\').disabled = false;
document.getElementById(\'1\').value = \'Pobierz Plik\';
}
return counter;
}
setInterval(\'counter = parseInt(counter); if(counter > 0) { counter = countdown(counter); }\', 1000);
</script>
';


i odlicza i gdy się skonczy odliczanie jest button pobierz plik ale gdy na niego naciskam nic się nie dzieje muszą się chyba mieszać "" lub '' ale nie wiem gdzie pomoże ktoś ?

@ juz se poradziłem sam sorry


Ten post edytował dk1342 18.10.2008, 11:39:53
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 13.10.2025 - 11:05