I tried to assign a new value into the hidden input and checkbox of an input form. It\'s working fine in Firefox but not in IE (I\'m using IE 7). Does anyone know what is wr
Jin Yong - IE has an issue with polluting the global scope with object references to any DOM elements with a "name" or "id" attribute set on the "initial" page load.
Thus you may have issues due to your variable name.
Try this and see if it works.
var someOtherName="abc";
// ^^^^^^^^^^^^^
document.getElementById('msg').value = someOtherName;
document.getElementById('sp_100').checked = true;
There is a chance (in your original code) that IE attempts to set the value of the input to a reference to that actual element (ignores the error) but leaves you with no new value.
Keep in mind that in IE6/IE7 case doesn't matter for naming objects. IE believes that "foo" "Foo" and "FOO" are all the same object.