I want to figure out whether the user has did any changes on the page. Below is what i am doing to achieve this. I am accessing the asp.net form elements in the javascript as below
var _totalElementsPresent = document.getElementById("aspnetForm").elements.length;
for( var i=0;i<_totalElementsPresent;i++)
{
var _formObject = document.getElementById("aspnetForm").elements[i];
switch(_formObject.type)
{
case 'select-one' :
case 'select-multiple':
for (var j = 0; j < _formObject.options.length; j++)
{
if (_formObject.options[j].selected !=_formObject.options[j].defaultSelected)
_flag = 1;
}
case 'radio' :
if (_formObject.checked != _formObject.defaultChecked)
I am setting the radio button selected false as below
<asp:RadioButton ID="CopyRadioButton" runat="server" Text="Copy"
Checked="false"/>
but _formObject.defaultChecked will be set to true.
How to set the radio button checked= false and dropdown selected= true.