I have a basic client side VBSCript form validation script that just checks to make sure that two fields contain an entry before submitting the data to the server. The script works fine if there is data missing and will raise a message box to notify the user. However, if the data is OK then it gives the following error:
Object doesn''t support this property or method: 'pwform.submit'
pwform is the name of my form. The code of the script is as follows:
Sub Submit_onClick
if pwform.pwname.value = "" then
MsgBox "Please enter your name", , "Invalid Entry!"
Exit Sub
end if
if pwform.pwcomp.value = "" then
MsgBox "Please enter your company name", , "Invalid Entry!"
Exit Sub
end if
' Nothing has failed the test - submit the form
pwform.submit
End Sub
All help would be appreciated.
Object doesn''t support this property or method: 'pwform.submit'
pwform is the name of my form. The code of the script is as follows:
Sub Submit_onClick
if pwform.pwname.value = "" then
MsgBox "Please enter your name", , "Invalid Entry!"
Exit Sub
end if
if pwform.pwcomp.value = "" then
MsgBox "Please enter your company name", , "Invalid Entry!"
Exit Sub
end if
' Nothing has failed the test - submit the form
pwform.submit
End Sub
All help would be appreciated.