Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


getting input from text box

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,26
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> getting input from text box
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 getting input from text box - 5/23/2001 4:43:38 AM   
  michael__johnson

 

Posts: 1
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
Ok, I have definitely had a brain freeze. How would I code a variable to equal the text in a text box? Here is what I thought would work and it's not happening:

Dim strFirstName
set strFirstName = frmStaff.txtBox.text
set strFirstName = frmStaff.txtBox.value

Thanks,
mike
 
 
Post #: 1
 
 Re: getting input from text box - 5/23/2001 5:37:03 AM   
  dwheatley

 

Posts: 7
Score: 0
Joined: 5/23/2001
From: Algeria
Status: offline
Dim str
str = frmStaff.txtBox.Value
?

(in reply to michael__johnson)
 
 
Post #: 2
 
 Re: getting input from text box - 5/23/2001 5:43:47 AM   
  adminkoe

 

Posts: 117
Score: 0
Joined: 12/23/2000
From:
Status: offline
Hi Michael,

Try this code, it works as long as you dont use Set command , Set defines a variable as an object and text field is not an object.

<html>
<head>

</head>
<body>

<form name="frmStaff">

<input type=text value="arrrghhhhhhhhhhhh" name="txtBox">

</form>
<script language="vbscript">
dim a
a = frmStaff.txtBox.value
msgbox a
</script>

</body>
</html>

Regards,
Andi Zain

(in reply to michael__johnson)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> getting input from text box Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts