File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

text field uneditable

 
Sandy Saahil
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not make the text portion of the file element readonly

Eric
 
Zip Ped
Ranch Hand
Posts: 336
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the readonly="true" attribute for the text field <input> tag.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64200
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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 ]
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • 0
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic