O
Obscurr
hi,
I've got a submit button, and when one clicks it, I want a confirm box
to pop up to make sure the user really wants that. The user is
supposed to be redirected to another url if he presses OK, and do
nothing if not. The way it works at the moment, is that the confirmbox
appears as it should, but whatever the user presses, the php code
continues to run. Any suggestions?
php:
echo "<INPUT type =\"submit\" name =\"test\"
ONCLICK=\"decision('sure?')\" value =\"Slett messe!\">
</TD></TR></form></table><br>";
function decision(message){
if (confirm(message)) window.location.href='http://www.vg.no';
}
obscurr
I've got a submit button, and when one clicks it, I want a confirm box
to pop up to make sure the user really wants that. The user is
supposed to be redirected to another url if he presses OK, and do
nothing if not. The way it works at the moment, is that the confirmbox
appears as it should, but whatever the user presses, the php code
continues to run. Any suggestions?
php:
echo "<INPUT type =\"submit\" name =\"test\"
ONCLICK=\"decision('sure?')\" value =\"Slett messe!\">
</TD></TR></form></table><br>";
function decision(message){
if (confirm(message)) window.location.href='http://www.vg.no';
}
obscurr