• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

text field uneditable

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all...i dont knw about javascript....i want a text field which should be such that no typing is allowed in that. data in that field can be entered by only browsing....can u suggest any such script...or any pointer..

thanx in advance.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can not make the text portion of the file element readonly

Eric
 
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use the readonly="true" attribute for the text field <input> tag.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Kailash Thiyagarajan:
Use the readonly="true" attribute for the text field <input> tag.



Kailash,

Sandy is talking about the type="file", try what you sugggested.

Eric
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:

Sandy is talking about the type="file", try what you sugggested.



Unless his post has been changed, I see no mention of the file type. Perhaps his mention of "browsing" is what's confusing.

At this point I think the OP needs to clarify the question.
[ May 26, 2006: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
You can not make the text portion of the file element readonly

Eric



Well, I would say not directly.
transparent div with absolute positioning ,right coordinates and z-index will actually do the impossible
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Yuriy Fuksenko:


Well, I would say not directly.
transparent div with absolute positioning ,right coordinates and z-index will actually do the impossible




what about me who does not use my mouse! Way too many factors that limit usability.

Eric
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for overcomplicating the matter onkeydown="retun false" seems to do the trick, at least in IE and Firefox

 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yuriy,

My point is you should not build the browser and its component around your application. Te applicaiton should be built around the browser. A lot of companies now a days are getting sued for inaccessability of their sites. Things like this are a reason. (It is an intranet application, so large companies to hire disabled people!)

What harm does typing something in do? Oh, the server does not load anything so you need to return an error message. Not hard to do. I personally use my tab key, enter key, space bar, etc to navigate a web page when I am on my tablet. I really hate using the small touch panel and I really do not feel like taking out the pen to do thigs when I can do it all from the keyboard!

Just a personal rant I have. LOL

Eric
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic