wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Non editable text box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Non editable text box" Watch "Non editable text box" New topic
Author

Non editable text box

Aravind JAI
Greenhorn

Joined: Feb 06, 2006
Posts: 18
I have a textbox with browse button. User can browse thro browse button only. He can't type anything in the text box. If he tries to enter any value in that test box, it has to throw an alert message. Please Give me sample code . Thankx in advance.
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
To make a text box non editable , you can use the readonly attribute in the inputtag like

But it wont give you any alerts.


Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I think you are talking about the file input? If that is the case you can not control the textbox seperate from the button.

Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Non editable text box
 
Similar Threads
Is it possible to make a file chooser in struts?
Getting error to upload file
style of browse button
input type=file question
URGENT-Resizing of submit button