I set readonly = "readonly" (in other words, true) via javascript:
document.getElementById("my_id").setAttribute("readonly", "readonly");
This has the intended effect (making the field no longer editable, but its contents are presented in the form) in FF, Safari and Chrome, but not for IE7. In IE7, I can still change the contents of the text input field.
I also tried the setting ("readonly", "true"), which works in all three other browsers that I am testing, but IE7 also ignores.
Does anyone have any experience with IE7? I do not want to use the disabled attribute, since I want the value in the text input field to be submitted with the form.
source share