Radio Button

maddirala

Freshman
Joined
Oct 21, 2003
Messages
30
Hi

i am doing .net application.i am using webform radiobuttons and grouped them.vat my problem is when user clicks A(Emergency) radio button i need to confirm and alert them is it true emergency? if they press ok then it's fine otherwise
if they press cancel i need check B(high) radio button automatically.

If any help i would appreciate

thanks
 
For a confirm you need javascript...

inside the header:
Code:
<script language="javascript">
function jsCheckFunction()
			{
				if (confirm("Your Questiontext"))
				{
					//RadioButton will be checked
					return true;
				}
				else
				{
					//RadioButton will not be checked
					return false;
				}
			}
</script>

inside the form:
Code:
<asp:RadioButton id="RadioButton1" runat="server" onclick="return jsCheckFunction();"></asp:RadioButton>

So, in the javascript funnction add code yu need, e.g. window.document.forms[0].RadioButton10.checked = true;

Regards, Stefan
 
It's not working

Hi
i did vat u said but i am getting error "return" is not a member of abcd.aspx(form name) page.
 
Back
Top