permaculture playing cards*
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 JavaScript Promises Essentials this week in the JavaScript 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Non editable text box