HTML form default values in Internet Explorer 9
I am just testing the brand new Internet Explorer 9 Beta with my website. I see a weird behaviour for some form values and I am not sure if it is my mistake or a bug in IE9. What do you think?

I have one form which declares several hidden input fields like this

    <input type="hidden" name="NewStatus" />
    <input type="hidden" name="lastSaveStatus" value="" />

When the page is being submitted, the values are saved like this (in JavaScript): 

    newStatus.setAttribute("value", myNewStatus);
    var formLastStatus = document.getElementsByName("lastSaveStatus")[0];
    formLastStatus.setAttribute("value", lastSaveStatus);
    alert(lastSaveStatus);
    alert(formLastStatus.getAttribute("value"));
    var form = document.getElementById("myForm"); 
    form.submit();

That code has worked for years and across all browsers. 
The alerts already indicate that I have now a problem with the lastSaveStatus field. 
In IE9 the NewStatus is correctly transmitted to the server (means that I can access the value in ASP.NET using Request.Form["NewStatus"]).
But the value for "lastSaveStatus" is always "". 

As you can see I used a value="" in the definition of my hidden field. If I remove this default value, the new value is correctly transferred to the server. If I use a default value, always the default value is transferred. 

Any idea why this is happening?



HTML form default values in Internet Explorer 9
===

I am just testing the brand new Internet Explorer 9 Beta with my website. I see a weird behaviour for some form values and I am not sure if it is my mistake or a bug in IE9. What do you think?

I have one form which declares several hidden input fields like this

    <input type="hidden" name="NewStatus" />
    <input type="hidden" name="lastSaveStatus" value="" />

When the page is being submitted, the values are saved like this (in JavaScript): 

    newStatus.setAttribute("value", myNewStatus);
    var formLastStatus = document.getElementsByName("lastSaveStatus")[0];
    formLastStatus.setAttribute("value", lastSaveStatus);
    alert(lastSaveStatus);
    alert(formLastStatus.getAttribute("value"));
    var form = document.getElementById("myForm"); 
    form.submit();

That code has worked for years and across all browsers. 
The alerts already indicate that I have now a problem with the lastSaveStatus field. 
In IE9 the NewStatus is correctly transmitted to the server (means that I can access the value in ASP.NET using Request.Form["NewStatus"]).
But the value for "lastSaveStatus" is always "". 

As you can see I used a value="" in the definition of my hidden field. If I remove this default value, the new value is correctly transferred to the server. If I use a default value, always the default value is transferred. 

Any idea why this is happening?


