script teller

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Yassin B

Yassin B

06/01/2013 14:37:30
Quote Anchor link
Hallo,

Wie kan mij helpen, ik wil dat deze script naardat de persoon op oke heeft geklikt op de alert de teller opnieuw begint te tellen.

Hier is de code :
Quote:
<script type="text/javascript">
window.onload = function() {
/* set your parameters(
number to countdown from,
pause between counts in milliseconds,
function to execute when finished
)
*/
startCountDown(15, 1000, myFunction);
}

function startCountDown(i, p, f) {
// store parameters
var pause = p;
var fn = f;
// make reference to div
var countDownObj = document.getElementById("countDown");
if (countDownObj == null) {
// error
alert("div not found, check your id");
// bail
return;
}
countDownObj.count = function(i) {
// write out count
countDownObj.innerHTML = i;
if (i == 0) {
// execute function
fn();
// stop
return;
}
setTimeout(function() {
// repeat
countDownObj.count(i - 1);
},
pause
);
}
// set it going
countDownObj.count(i);
}

function myFunction() {
alert("Wacht totdat de volgende webpagina komt !!!");
}
</script>


Mvg,

Yassin

Toevoeging op 06/01/2013 15:04:51:

reacties ?
 
PHP hulp

PHP hulp

04/05/2024 06:19:54
 
Jan R

Jan R

06/01/2013 15:50:41
Quote Anchor link
vervang
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
function myFunction() {
 alert("Wacht totdat de volgende webpagina komt !!!");
 }


in
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
function myFunction() {
 alert("Wacht totdat de volgende webpagina komt !!!");
startCountDown(15, 1000, myFunction);
 }


dus 1 lijntje toevoegen

Jan
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.