Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alert box that will submit a form

Status
Not open for further replies.

mycz0ne

Programmer
Joined
Jun 29, 2006
Messages
2
Location
PH
i rally need help... i have this page wherein i have a timer... as soon as the time expires, i want an alert box to appear then submit the form to another page... please... i really need help...
 
someone actually gave me a code which worked... however, it's showing a confirm dialog box instead of an alert box... here's the code...

function subForm(){
var conf=confirm('Submit?')
conf?document.forms['formname'].submit():null;
}
onload=function(){setTimeout('subForm()',300000)}//5 minutes
</script>
 
Maybe something like this:

Code:
function subForm(){ 
alert("Game over");
document.forms['formname'].submit();
} 
onload=function(){setTimeout('subForm()',300000)}//5 minutes 
</script>

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top