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

How to block users from inputing into a textbox?

Status
Not open for further replies.

DrAsh

Technical User
May 3, 2001
46
US
1) I have a text box on my form. I do not want anyone to be able to write in it as it's a special text box. Text values taken from another part of the page will be inserted into that text box. I don't want the users to be able to manual fill in the box. At the same time, I have function in my page that will fill in that special textbox only if certain conditions are met (like they pass the test). I don't want them to manually enter text in themselves. That's cheating. Anyone know how?
 
Hi DrAsh,

Try this,

<input type=&quot;text&quot; value=&quot;something&quot; onFocus=&quot;this.blur();&quot;>

hope this helps, Chiu Chan
WebMaster & Software Engineer
emagine solutions, inc
cchan@emagine-solutions.com
 
Try this:

<input type=&quot;text&quot; value=&quot;something&quot; Readonly>

You can change the value by programming, but the user can not input.
 
<input type=&quot;text&quot; value=&quot;something&quot; Readonly>

has issues in NS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top