Click to See Complete Forum and Search --> : ASP with Form
gop373
10-27-2004, 07:05 AM
<input type="text" size="5" name="pricestock" maxlength="4" value="<%=rst("price")%>">
By using code above the user will be able to change the data.
Are there any way that do not allow the user to change the data .
stevem2004
10-27-2004, 07:29 AM
Hi gop373,
Don't put it in an input box.
gop373
10-27-2004, 08:20 AM
But I want to show the result in an input box.
gop373
10-27-2004, 08:26 AM
Ok it worked now. I just added " disabled"
lmf232s
10-27-2004, 09:27 AM
hey dont use disabled.
If you use disabled then you will not be able to get the
value from the text box.
If you try this
MyTest = request.form("txtTest")
<input type=text name=txtTest value=Hello disabled>
<input type=submit name=submit value=submit>
MyTest will not be populated because it can not read the value
from the text box because it is disabled.
Plus when you use disabled it greys out the text.
Instead use
readonly
<input type=text name=txtTest value=Hello readonly>
This locks the text box but will let you interact with the text box
and retrieve the value and it will not grey out the text.