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