Hi Kayahr,
The purpose is not actually to disable it, I used that as an example. Actually, I want to validate user's input and prevent the change if validation fails.
Ex: <input type="text" name="whatever" onchange="return(validateF
As said, this was working perfectly for years before IE7 and FF3.
Main Topics
Browse All Topics





by: kayahrPosted on 2008-09-10 at 21:57:21ID: 22446427
This is a strange method to disable a text box. Is there a reason why you don't use the "disabled" attribute?
<input type="text" disabled="disabled" />
With this attribute (which works for ALL input elements in ALL browsers) the user is not able to change the value and the text box is "grayed out" to indicate this.
Another possibility is
<input type="text" readonly="readonly" />
This also prevents editing but the GUI style is different (Not "grayed out").