How to make a popup confirmation when clicking submit
Moderator: General Moderators
Disregard the first msg for minute. I would like to get the rest of the info to appear in the same place that the one we just added. Like when I click approved it will appear at the top like the add testimonial did. How can I get the else if to work with those. I changed all the other pagemessages to a different number like 1-7. But I can't seem to get the else if to work. How would I add the else if?
To answer your original question, you can do an "onsubmit" call.
Code: Select all
<html>
<head>
<script language = "javascript/css">
function confirm_form()
{
return(confirm('Are you sure you want to submit this form?'));
}
</script>
</head>
<body>
<form name = "test_form" method = "POST" action = "$PHP_SELF" onsubmit = "return confirm_form();">
<input type = "submit" name = "submit_button" value = "test confirmation">
</form>
</body>
</html>Real programmers don't comment their code. If it was hard to write, it should be hard to understand.