data: "name=" + name + "& email=" + email + "& password=" + password + "& custom1=" + custom1 + "& custom2=" + custom2 + "& custom3=" + custom3 + "& custom4=" + custom4 + "& custom5=" + custom5 + "& custom6=" + custom6 + "& custom7=" + custom7 + "& custom8=" + custom8 + "& custom9=" + custom9 + "& custom10=" + custom10,
Это так неправильно, неправильно и безобразно. После &
не должно быть пробелов. На самом деле прохождение строки там уже плохо. Передайте объект как это:
var data = { name: name, email: email, password: password, custom1: custom1, ... };
с использованием data: data
Вот исправленная версия:
$(document).ready(function () {
$("#various1").fancybox({
'opacity': true,
'overlayShow': false,
'transitionIn': 'none',
'autoscale': 'false',
'transitionOut': 'none'
});
$("form").submit(function () {
var data = {
name: $('#name').val(),
email: $('#email').val(),
password: $('#password').val(),
custom1: $('#custom1').val(),
custom2: $('#custom2').val(),
custom3: $('#custom3').val(),
custom4: $('#custom4').val(),
custom5: $('#custom5').val(),
custom6: $('#custom6').val(),
custom7: $('#custom7').val(),
custom8: $('#custom8').val(),
custom9: $('#custom9').val(),
custom10: $('#custom10').val()
};
$.ajax({
type: "POST",
url: "test.php",
data: data,
success: function() {
$('submit').fadeOut(function () {
$('div.success').fadeIn();
});
}
});
return false;
})
Вы действительно должны использовать плагин формы jquery , чтобы отправить эту форму, хотя ... Экономит вам много времени, набирая все имена полей ...