1 Replies - 166 Views - Last Post: 06 June 2013 - 01:35 PM

#1 basicprogramming  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 24-April 13

Checking for Empty User Text Fields

Posted 06 June 2013 - 01:30 PM

First of all, I'm not sure if Dream.In.Code has a forum for Visual Basic scripting, so please let me know if I'm posting in the wrong forum, and I apologize in advance.
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!
Thank you.

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.

Is This A Good Question/Topic? 0
  • +

Replies To: Checking for Empty User Text Fields

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3715
  • View blog
  • Posts: 5,972
  • Joined: 08-June 10

Re: Checking for Empty User Text Fields

Posted 06 June 2013 - 01:35 PM

View Postbasicprogramming, on 06 June 2013 - 09:30 PM, said:

First of all, I'm not sure if Dream.In.Code has a forum for Visual Basic scripting, so please let me know if I'm posting in the wrong forum, and I apologize in advance.

We don't have a forum for that, no. It's sort of an irrelevant language these days, to be honest. Javascript is pretty much the language used for client-side web scripting. - Is there a reason you are using this relic of a language instead of Javascript? (Just curious, really :))

Anyway, since this really isn't a HTML/CSS issue, and we don't have a specific forum for this, I've moved to to the main Web Development forum. Probably the best place for it around here.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1