Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attaching an Object to a Text Box in HTML..

Status
Not open for further replies.

1Data

MIS
Sep 30, 2005
66
US
I need to get the length of a text box value and attach it to an object in VBScript...

dim intvalue = Len(form.purchaseprice1.value)

does not work I was wondering if someone can help me with this... I keep getting an Expected End of Statements...If someone can offer some advice I would appreciate it.

 
This forum is for Active Server Pages... server-side script.

I think you are asking about client-side script... it looks like you are reading the browser Document Object Model.

That said, you don't want to assign a value to a variable in the same line that you declare it.

In C-style languages such as JavaScript you might do this:
var intvalue = 1;

But in VB-style languages such as VBScript you need two lines:
Dim intvalue
intvalue = 1

Actually, since VBScript is not really a "typed" language, you could just skip declaring the variable. It is good practice to do this but not required.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top