Ben Gönder düğmesini tıkladığımda düğmeleri-abone 2radio ve unsubscibe ve bir gönderme button.But var bülten subscription.I yapıyorum, ajax fonksiyonu i validation.I yapmak istiyorum subscription.Now için çağrılır radyo düğmeleri için bir javascript doğrulama yazdım aşağıdaki gibi:
function validate_radio()
{
var radio_choice = false;
var radio_val = document.newsletterform.subscribe.length;
for (counter = 0; counter < radio_val; counter++)
{
if (document.newsletterform.subscribe[counter].checked)
radio_choice = true;
}
if (!radio_choice)
{
document.getElementById("mandatory").innerHTML="Select Subscribe/Unsubscribe";
return false;
}
}
But now I am getting the validate message but at the same time i am getting subscribed. tell me a way so that i can stop the subscription being done if the function returns false. I am calling the function as follows: