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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Box

Status
Not open for further replies.

JimmyFo

Programmer
Feb 14, 2005
102
US
Hi, quick question: if I were looking to modify a textbox (ASP or standard HTML input) by JavaScript, how would I go about doing it? At a certain point in my script, I would like to be able to append data on a new line in this text box.

It can really be anything, a textbox, label, etc, it just needs to be accesable to the VB codebehind.

Thanks,
James
 
Code:
[i]element[/i].value += "\n append this text";

\n means new line. it won't have an affect in a text box. it will in a text area. it won't in a label.

for labels, use <br /> instead of \n.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Thanks for the reply - quick comment on this. I'm working with the JS here for multiple uploads.

What it's doing is using multiple "div"s from a parent to display selected files dynamically. Does the element refer to only one object, the parent div object? Since this value is still residing in the JS, how do I get the value passed to a hidden textbox/label, so that my VB codebehind can access it?

Thanks,
James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top