The same id radio buttons dosent work on post form.
Here is a script and its uses a latest jquery
$(function() {
$(".submit").click(function() {
var name = $("#name").val();
var surname = $("#surname").val();
var gender = $("#gender").val();
var birthyear = $("#birthyear").val();
var birthmonth = $("#birthmonth").val();
var birthday = $("#birthday").val();
var town = $("#town").val();
var country = $("#country").val();
var postalcode = $("#postalcode").val();
var dataString = 'name='+ name + '&surname=' + surname + '&gender=' + gender + '&birthyear=' + birthyear + '&birthmonth=' + birthmonth + '&birthday=' + birthday + '&town=' + town + '&country=' + country + '&postalcode=' + postalcode;
//alert (dataString);return false;
if(name=='' || surname=='')
{
$('html, body').animate({scrollTop:0}, 'slow');
$('.notify-note').fadeOut(200).hide();
$('.notify-error').fadeOut(200).show();
}
else
{
$.ajax({
type: "POST",
url: "settings.php",
data: dataString,
success: function(){
$('html, body').animate({scrollTop:0}, 'slow');
$('.notify-note').fadeIn(200).show();
$('.notify-error').fadeOut(200).hide();
}
});
}
return false;
});
});
To send a gender string i use
<INPUT type="radio" id="gender" name="gender" value="m">
<INPUT type="radio" id="gender" name="gender" value="f">
Its sends only a M value ..
The different IDs gives a undefined
there is a problem with radio button DOM - Jquery
Please help or fix :) Thanks