function deny_user(email_id)
{
window.opener.document.location.href = "website_url/?_action=deny&email_id="+email_id+"&show=confirmed";
window.opener = self;
window.close();
}
function get_radio_value()
{
for (var i = 0; i < document.email_form.id.length; i++)
{
if (document.email_form.id[i].checked)
{
deny_user(document.email_form.id[i].value);
return true;
}
}
alert("You must select a type of email");
return false;
}
Now everything goes perfectly unless there is only 1 radio button. If there is only 1 button then it will never let me submit it. Can someone lend me a hand and tell me why this problem exists?
function get_radio_value()
{
if (document.email_form.id.length)
{
for (var i = 0; i < document.email_form.id.length; i++)
{
if (document.email_form.id[i].checked)
{
deny_user(document.email_form.id[i].value);
return true;
}
}
}
else
{
if (document.email_form.id.checked)
{
deny_user(document.email_form.id.value);
return true;
}
}
alert("You must select a type of email");
return false;
}
Last edited by VladSun on Tue Aug 07, 2007 4:50 pm, edited 1 time in total.
There are 10 types of people in this world, those who understand binary and those who don't