|
-
March 20th, 2007, 02:54 PM
#3
I did not use return true for validating, I only used return true in the confirmation msg, that is if the user enters information into the form and then by mistake he clicks reset confirmation msg will pop up, asking him whether he want to reset or not, and if he clicks ok it will return true (a fresh form) and if he clicks cancel nothing will happen..........
The following is the code....... and it is working well
<script>
function Confirm()
{
var agree = confirm ("Are you sure you want to resert");
if (agree)
{
return true
}
else{
return false
}
}
</script>
<input type="reset" value="Reset" name="B2" onclick="return Confirm()">
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|