Tutorial
Click on thumbnailed images to enlarge
<script type="text/javascript">
function theAlert(){
// ok u know this one
alertMsg = "this is your alert's message";
// outputs the alert message
window.alert(alertMsg);
/*using alert() only without the "window" is just the same as alert(alertMsg)*/
}
// here's where the timer engine is
function timedAlert(){
// this is your timer, 1 for 1 second, 2 = 2 seconds, 3 = 3 seconds, and so on...
int = 0;
/*since working with the setTimeout requires you to use milliseconds, you have to multiply "int" with 1000*/
setTimeout("theAlert()", int*1000);
}
/*if you want to create alerts without hassle, check out my alert generator at www.bottie.org ;) - enjuoy*/
</script>
function theAlert(){
// ok u know this one
alertMsg = "this is your alert's message";
// outputs the alert message
window.alert(alertMsg);
/*using alert() only without the "window" is just the same as alert(alertMsg)*/
}
// here's where the timer engine is
function timedAlert(){
// this is your timer, 1 for 1 second, 2 = 2 seconds, 3 = 3 seconds, and so on...
int = 0;
/*since working with the setTimeout requires you to use milliseconds, you have to multiply "int" with 1000*/
setTimeout("theAlert()", int*1000);
}
/*if you want to create alerts without hassle, check out my alert generator at www.bottie.org ;) - enjuoy*/
</script>
Tutorial Comments
No comments yet. Be the first one to comment!