I'm trying to figure out how to check if a user has left a text box empty in a questionnaire. I have a button all the way at the bottom with the name of the input type and such.
This part of it is towards the end of the bottom of the body tag.
Full Name <Input Type=Text Name="txtFullName"><br> <Input Type=Button Name="cmdCheck">
And then earlier, within the script tag, I have the following.
<Body> <Form Name="CDOrderProject" Method="Post" Action="mailto:..." Enctype="text/plain"> <script Language="VBScript">
And then past that, I have (still within the script tag)...
Sub cmdCheck_onclick() If txtFullName="" Then Msgbox "Enter your full name." End If End Sub
Any help would be appreciated!
By the way, the code that I listed there doesn't work, that's just what I have right now. I'm trying to figure out how to show a message box when the text field is recognized to be empty. Right now, the message box appears even if the text field has user input. Thanks.