Reputation: 521
HTML, readonly not worked in IE 8 and IE 9, if any other way to solve,
here is my code,
<input
size="15"
type="text"
name="oldValueMonthlyLimit"
id="oldValueMonthlyLimit"
readonly =true
value="<%=oldValueMonthlyLimit%>">
Upvotes: 0
Views: 16341
Reputation: 21
The 'disabled' input elements are used to prevent its value from being submitted.
'readonly' input element doesn't work in IE 8,9, 10 or 11.
In this case, we can use onkeydown="javascript: return false;" for protected (disable) input element and receive its value in the form post data
Upvotes: 1
Reputation: 7478
Try this:
<input type="text" onfocus="this.blur()" readonly="" >
Also in CSS, put this to make the cursor not change while hovering over the input.
cursor: inherit;
Upvotes: 0
Reputation: 20844
Use disabled then.
<input
size="15"
type="text"
name="oldValueMonthlyLimit"
id="oldValueMonthlyLimit"
disabled value="text" >
See also this: Example
Upvotes: 2
Reputation: 6788
From w3schools:
<input readonly="readonly">
Note: The readonly attribute is a boolean attribute, and can be set in the following ways:
<input readonly>
<input readonly="readonly">
<input readonly="">
Upvotes: 0