|
-
Oct 3rd, 2005, 07:20 AM
#1
Thread Starter
Fanatic Member
Form clears after alert
I have three buttons included in my form. I have a javascript onclick event for one of the submit buttons. Here is the javascript associated with the onclick event:
function chkSave(){
if(document.form1.txtjobnum.value == "")
{
window.alert("please enter a job number");
document.form1.txtjobnum.focus();
return false;
}
}
The alert box works correctly but whenever I click on OK in the alert box my all the data in my form is cleared. Can anybody explain why this is happening?
-
Oct 3rd, 2005, 07:29 AM
#2
Re: Form clears after alert
Any refreshing going on that isn't being shown?
-
Oct 3rd, 2005, 07:30 AM
#3
Thread Starter
Fanatic Member
Re: Form clears after alert
No refreshing. I thought return false was the solution but it doesn't work.
-
Oct 3rd, 2005, 07:43 AM
#4
Re: Form clears after alert
If you click on Cancel on the Alert button, does the same thing happen?
-
Oct 3rd, 2005, 07:45 AM
#5
Thread Starter
Fanatic Member
Re: Form clears after alert
There is no choice for a cancel, there is just an OK button.
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
|
Click Here to Expand Forum to Full Width
|