That is very nice. Yes that is what I was looking for. Although on the first selection the alert did not give the deselect.
I even added the "checked" to the first button
- <html>
-
<head>
-
<script language="JavaScript">
-
var Selected = '';
-
function doSelect(Object)
-
{
-
alert('The deselected is: ' + Selected + ',\nThe selected is: ' + Object.value);
-
Selected = Object.value;
-
}
-
</script>
-
</head>
-
<body>
-
<input type="radio" name="list" onclick="doSelect(this)" checked value="isPartOf">isPartOf<br>
-
<input type="radio" name="list" onclick="doSelect(this)" value="isNotPartOf">isNotPartOf<br>
-
<input type="radio" name="list" onclick="doSelect(this)" value="delete">delete
-
</body>
-
</html>
So thank you very much for the help.
I did solve the problem another way. I removed the "deleted" button when the "isNotPartOf" was selected.
And then if "isPartOf" was reselected, I restored the button
use this translation
exp_ = isPartOf
rem_ = isNotPartOf
del_ = delete
- if (cAction == 'rem_')
-
{
-
var elem = document.getElementById("del_"+cKey);
-
elem.parentNode.removeChild(elem);
-
}
-
if (cAction == 'exp_' && !document.getElementById("del_"+cKey))
-
{
-
cVal = document.getElementById("attr_"+cKey).innerHTML
-
cVal += '<input ';
-
cVal += 'type="radio" ';
-
cVal += 'id="del_'+cKey+'" ' ;
-
cVal += 'onclick="changeStatus(this);" ';
-
cVal += 'value="RemoveFromCompany" ';
-
cVal += 'name="'+cKey+'"/> ' ;
-
-
document.getElementById("attr_"+cKey).innerHTML = cVal
-
}
-