Hi,
I have a hidden field and a check box, I want to change the value of the checkbox onclick event, but for some reason the value is not getting set. could somebody tell me if I am doing anything wrong..??
thanks
jag
below is the code..
<input type="hidden" name="unitRefunded" value="false"/>
<input type="checkbox" name="inputUnitIncluded1" onclick="javascript:toggle2(unitRefunded,unitRefunded.value)" checked/>
my javascript method which is in the head
function toggle(temp1, temp2)
{
alert('temp1 -- ' + temp1.value + ' temp2(t/f) ' + temp2);
if(temp2 == false)
{
temp1.value = true; //this is not happening!!
}
else
{
temp1.value = false;
}
}
I have a hidden field and a check box, I want to change the value of the checkbox onclick event, but for some reason the value is not getting set. could somebody tell me if I am doing anything wrong..??
thanks
jag
below is the code..
<input type="hidden" name="unitRefunded" value="false"/>
<input type="checkbox" name="inputUnitIncluded1" onclick="javascript:toggle2(unitRefunded,unitRefunded.value)" checked/>
my javascript method which is in the head
function toggle(temp1, temp2)
{
alert('temp1 -- ' + temp1.value + ' temp2(t/f) ' + temp2);
if(temp2 == false)
{
temp1.value = true; //this is not happening!!
}
else
{
temp1.value = false;
}
}