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

set text in a textfield

Status
Not open for further replies.

camillaj

Programmer
Sep 18, 2003
31
AU
I am trying to set a text into a textfield when some conditions are met. I have this textfield:

<input name=&quot;textrow1&quot; type=&quot;text&quot; size=&quot;25&quot;/>

I don't want to use the value attribute. When I have a value for it I instead use Response.Write(&quot;textfieldvalue&quot;) (Then it is not editable). But also one time during a session I might have to change this to an editable textfield, i.e. the textrow1 with the &quot;textfieldvalue&quot; in.

Is there a way in asp to set the value of a textfield, such as textrow1.setText(&quot;textfieldvalue&quot;)? Without using javascript!

Thanks for all your help :)

 
tell me when u want it to be editable/readable (the condition)...

Known is handfull, Unknown is worldfull
 
Thanks, but actually when I thought about it,
I found a way through it.

I set a special Session when the condition is met and use it in the value field, such as:

<input name=&quot;textrow1&quot; type=&quot;text&quot; size=&quot;25&quot; value=&quot;<%= Session(&quot;EditValue&quot;) %>&quot; />

When the session is empty it doesn't show anything, which is what I wanted.

Sorry, this was maybe a stupid question to ask on this forum.... hard to explain what I ment...
Thanks anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top