|
| |||||||||
| Tags: asp pages, jscript, scripting language, server side scripting, vbscript, visual basic |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| VBScript to get textbox values
I have just began to learn the scripting language- VBScript. I am also side by side learning Visual Basic 6.0 as it is in my academic requirements. Our group have been assigned a small assignment to develop a website using VBScript. And I have to access the values which are present in the text boxes. How can I proceed to script this in VBScript. Please explain. |
|
#2
| ||||
| ||||
| document.getElementByID
I am not that much aware of VB-script but I do know that the document.getElementByID works with JavaScript for all web browsers. But this too has a limitation that it works only on the client-side. So in case you want it for client side you may try the document.getElementByID. |
|
#3
| |||
| |||
| Server Side and Client Side scripting
I have to deal with the server side code as well as the client side code because I am needed to give the textbox value to a function which is on the server side as a parameter. I know we can use the Request.Form function, but I do not want to a postback. So kindly please help me sort this out. |
|
#4
| ||||
| ||||
| Validating text box Code: <HTML>
<HEAD><TITLE>TextBox Checking</TITLE>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Submit_OnClick
Dim form
Set form = Document.ValidForm
If IsNumeric(form.txtb1.Value) Then
If form.txtb1.Value < 11 Or form.txtb1.Value > 20 Then
MsgBox "Please input from a range of 11 - 20"
End If
Else
MsgBox "Only Numbers."
End If
End Sub
-->
</SCRIPT>
</HEAD>
<BODY>
<H3>Verifications</H3><HR>
<FORM NAME="fform">
Give a number from 11 to 20:
<INPUT NAME="txtb1" TYPE="TEXT" SIZE="2">
<INPUT NAME="Submit" TYPE="BUTTON" VALUE="Submit">
</FORM>
</BODY>
</HTML> |
|
#5
| ||||
| ||||
| Application Form
I have written the application form for accepting the user's first name and last name and then providing the user with his/her full name. This I had to use in my website which I had to built for an assignment which was given to me. Code: <B>Application</B>
<form name="App">
<table border="0" width="300">
<tr>
<td width="80">Initial Name:</td>
<td width="194"><input type="text" name="txtfname" size="14"
onChange="form.txtfull.value = form.txtfname.value + ' ' +
form.txtlname.value"></td>
</tr>
<tr>
<td width="80">Surname:</td>
<td width="194"><input type="text" name="txtlname" size="14"
onChange="form.txtfull.value = form.txtfname.value + ' ' +
form.txtLastName.value"></td>
</tr>
<tr>
<td width="100">Full Name:</td>
<td width="200"><input type="text" name="txtfull" size="25"></td>
</tr>
</table>
</form> |
|
#6
| ||||
| ||||
| USe Ajax
I would suggest you to use Ajax to deal with any server side scripting using JScript instead of Vb Script. This is because doing so you will be able to add values in your post from the form values. As you are using JScript, the ASP page will be able to locate that information in Request.Form but the page will not be refreshed. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "VBScript to get textbox values" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| W32 registry values are not getting matched by the default values | Angrzej | Networking & Security | 5 | 19-05-2011 01:23 PM |
| Excel/VBA: Copying text from UserForm Textbox to a Worksheet Textbox | Neil Ives | Software Development | 2 | 20-08-2010 02:23 AM |
| how to hide a textbox in asp.net | Alejandro | Software Development | 2 | 10-06-2009 11:43 AM |
| How to use Textbox values for calculations | Sonic | Software Development | 4 | 26-11-2008 08:17 PM |
| bug in WMP version 11 - DRM values show incorrect values | Ollie Riches | Media Player | 4 | 06-04-2007 05:08 AM |