Ash
10-27-2003, 06:02 AM
Hi,
I've got a simple function that double-checks with the user:
function quick_confirm() {
var agree=confirm("Are you sure you wish to continue?");
if (agree) return true ;
else return false ;
}
Then I've got a form with a SELECT that submits onchange.
<form method="post" action="change_accomm.php" onsubmit="quick_confirm()">
<select name="accomm_id" onchange="submit(this)">
I thought that this would call 'quick_confirm' when submit was called (ie when 'accomm_id' is changed) but it just submits the form and bypasses the 'quick_confirm' function completely!
Any ideas on what I'm doing wrong ?
Many thanks,
Ash
I've got a simple function that double-checks with the user:
function quick_confirm() {
var agree=confirm("Are you sure you wish to continue?");
if (agree) return true ;
else return false ;
}
Then I've got a form with a SELECT that submits onchange.
<form method="post" action="change_accomm.php" onsubmit="quick_confirm()">
<select name="accomm_id" onchange="submit(this)">
I thought that this would call 'quick_confirm' when submit was called (ie when 'accomm_id' is changed) but it just submits the form and bypasses the 'quick_confirm' function completely!
Any ideas on what I'm doing wrong ?
Many thanks,
Ash