Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Non editable text box

 
Aravind JAI
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To make a text box non editable , you can use the readonly attribute in the inputtag like

But it wont give you any alerts.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic