Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pass VBScript Variable to HTML Textbox via Value Property

736 views
Skip to first unread message

Steve Curtin

unread,
Jun 26, 2000, 3:00:00 AM6/26/00
to
1. set rs1=cn.execute(strSQL)
2. strCourse = rs1(0) ' strCourse = Alburg CC
3. Response.Write strCourse ' Alburg CC

4. <INPUT type="text" id=coursename name=coursename value=<% = strCourse %>
> ' Only "Alburg" - Not "Alburg CC"


When I try to move the value from the vbscript variable strCourse
(where it is stored correctly) to the text box, It only transfers
the "Alburg" not the full value in the variable "Alburg CC".

How do I transfer the entire contents of strCourse to the value property
of the textbox?

Thanks

Michael Harris

unread,
Jun 26, 2000, 3:00:00 AM6/26/00
to
Enclose the value in quotes...

4. <INPUT type="text" id=coursename name=coursename value="<% = strCourse %>"

--
Michael Harris
MVP Scripting


"Steve Curtin" <stephe...@hotmail.com> wrote in message news:#wFh$W83$GA.87@cppssbbsa05...

Steve Curtin

unread,
Jun 27, 2000, 3:00:00 AM6/27/00
to
How about a textarea ??? I need to transfer the contents of an access memo
field via ADO to a textarea for editing.

Tried using the " " - is there anything special about textarea ??

> 1. set rs1=cn.execute(strSQL)
> 2. strCourse = rs1(0) ' strCourse = "contents of an
access memo field"


> 3. Response.Write strCourse ' Alburg CC
>

> 4. <INPUT type="textarea" id=coursename name=coursename value=<% =
strCourse %>

Tried inserting the " " on textarea , but cannot get contents to display.

Thanks

"Michael Harris" <Please...@To.NewsGroup> wrote in message
news:uIirnk83$GA....@cppssbbsa02.microsoft.com...

Michael Harris

unread,
Jun 27, 2000, 3:00:00 AM6/27/00
to
To start with, there's no such thing as <input type="textarea" ...>

INPUT Element | INPUT Object
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/input.asp

What you want is

TEXTAREA Element | TEXTAREA Object
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/textarea.asp

--
Michael Harris
MVP Scripting


"Steve Curtin" <stephe...@hotmail.com> wrote in message news:#e2cRkJ4$GA.247@cppssbbsa05...

Marlin Forbes

unread,
Jul 5, 2000, 3:00:00 AM7/5/00
to
I think a textarea is normally specified as:

<textarea id='somid' name='somename'>Some text</textarea>
or in your case as:
<textarea id=coursename name=coursename><%= strCourse %></textarea>

0 new messages