Hi, I got a validation script and a confirm script, I want that if the validation return false than no to do the confirm func. just return a msg in the lable text as it does. and if the validation return true than do the confirm func. and if I press on ok at the confirm than return true , cancel return false. My 2 Scripts are: function Validate() { var radiobuttonList = document.getElementsByName("MyRadioButton1"); var isSelected = false; for( i=0; i<radiobuttonList.length;i++) { if (radiobuttonList.checked) { isSelected = true; } } if(!isSelected) document.getElementById("lblTEXT1").innerText = "Must select a row"; return isSelected; } -------------- function confirmDelete() { var answer = confirm("?are u sure") if (answer) { alert("msg delete"); return true; } else { alert("msg not delete"); return false; } } How to do that? Thanks, Gil
if (radiobuttonList.checked.value=(value)) Checked is a property of the radio button which contains the value it is to have when checked. <input TYPE="radio" checked="on"> If the radio button is selected it will return a value of "on"