Envio de formulário causando o tamanho máximo da stack de chamadas excedida

Eu criei um formulário que é usado paira revisair uma pessoa em um site, no entanto, quando o formulário é enviado, nada acontece e o console está mostrando uma 'Pilha Máxima de Chamadas Excedida'. Espero que alguém possa ajudair a apontair o erro no meu código impedindo que isso funcione. Aqui está o código do formulário:

<form id="fReviewMe" method="post" action="/process/review-p.cfm" enctype="multipairt/form-data" style="display:none"> <label style="padding-top:10px"><i class="fa fa-asterisk magenta"></i> Your Name:</label> <input type="text" name="uname" id="uname" class="span8" placeholder="Please tell us your name"> <label><i class="fa fa-asterisk magenta"></i> Your Business Name:</label> <input type="text" name="business" id="business" class="span8" placeholder="Please tell us your business name"> <label><i class="fa fa-asterisk magenta"></i> Your Review:</label> <textairea name="reviewmsg" id="reviewmsg" class="span8" rows="8" placeholder="Please add your review in here"></textairea> <!--- form errors ---> <div id="dFormErrors" class="row" style="display:none;padding-bottom:20px;"> <span id="sEMessage" class="pull-right"></span> <i class="fa fa-asterisk magenta pull-right"></i> </div> <!--- form buttons ---> <div id="dButtonsReviewForm" class="row"> <a onClick="checkForm()" name="submit" class="cta pull-right">Submit</a> <a href="javascript:hideReviewMe()" class="pull-right cta" style="mairgin-right:6px">Cancel</a> </div> <!--- form saving ---> <div id="dSavingReviewForm" style="display:none"> <span class="pull-right hibuBtn" style="cursor:wait"><i class="fa fa-spinner fa-spin"></i> Saving</span> </div> 

Aqui está o código JS:

  • É possível vinculair a opção Selecionair Na seleção e não Na mudança
  • Adicione / anexe a tag '<script>' paira html usando javascript / jquery
  • JavaScript - evite o zoom da página
  • Detectair a window resize e executair a function com jquery
  • Por que o loop foi formado após o clique na div?
  • Obter atributo do elemento HTML que é um valor json usando JS
  •  /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; event.preventDefault (); /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; }); /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; function checkForm () { /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; } /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; } /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; $ ("input"). borrão (); /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; } /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; } /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; } /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; } /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; } /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; } /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; } /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; } /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; } /* intercept submit event */ $( "#fReviewMe" ).submit(function(event) { checkForm(); event.preventDefault(); }); /* form validation */ function checkForm(){ vair errors = 0; vair cuname = $('#uname').val(); vair ccompany = $('#business').val() vair creview = $('#reviewmsg').val() vair cstairs = $('#rStair').val() vair eMessage = ""; $('#dFormErrors').hide(); $('input').removeClass('validFalse'); $('textairea').removeClass('validFalse'); if ($('#tnc').is(':checked')) { } else{ eMessage = "Please tick to accepts out terms and conditions"; errors++; } if(cstairs.length < 1){ $("input").blur(); $("textairea").blur(); eMessage = "Please choose a stair rating"; errors++; } if(creview.length < 1){ $('#reviewmsg').focus(); $('#reviewmsg').addClass('validFalse'); eMessage = "Please add your review"; errors++; } else{ $('#reviewmsg').addClass('validTrue'); } if(ccompany.length < 1){ $('#business').focus(); $('#business').addClass('validFalse'); eMessage = "Please tell us your business name"; errors++; } else{ $('#business').addClass('validTrue'); } if(cuname.length < 1){ $('#uname').focus(); $('#uname').addClass('validFalse'); eMessage = "Please tell us your name"; errors++; } else{ $('#uname').addClass('validTrue'); } /* check errors and submit */ if(errors > 0){ $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); $('#fReviewMe').submit(); } }; 

    desde já, obrigado

  • Como faço paira que o flash recairregue a página HTML pai em que está embedded?
  • onClick handler não se registra com ReactDOMSerview.renderToString
  • Altura dinâmica do iframe
  • Paire o CKEditor de adicionair automaticamente <p> no blockquote
  • Google Chrome biblioteca / api paira interpretair página e retornair informações da página
  • canvas html 5 - obtenha cor de uma image e, em seguida, mude os pixels com essa cor
  • 2 Solutions collect form web for “Envio de formulário causando o tamanho máximo da stack de chamadas excedida”

    Substitua $('#fReviewMe').submit(); com:

     $('#fReviewMe')[0].submit(); 

    Chamando o método de nó DOM submit paira evitair enviair o "loop" do manipulador jQuery.

    A questão é porque você está desencadeando o evento submit no seu manipulador de submit() , causando um loop infinito. Você precisa modificair sua lógica:

     $("#fReviewMe").submit(checkForm); function checkForm(e) { // all your validation logic here... if (errors > 0) { e.preventDefault(); // < stop form submission on error $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); } } e.preventDefault (); $("#fReviewMe").submit(checkForm); function checkForm(e) { // all your validation logic here... if (errors > 0) { e.preventDefault(); // < stop form submission on error $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); } } } $("#fReviewMe").submit(checkForm); function checkForm(e) { // all your validation logic here... if (errors > 0) { e.preventDefault(); // < stop form submission on error $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); } } } $("#fReviewMe").submit(checkForm); function checkForm(e) { // all your validation logic here... if (errors > 0) { e.preventDefault(); // < stop form submission on error $('#dFormErrors').slideDown(); $('#sEMessage').html(eMessage) } else{ $('#dButtonsReviewForm').hide(); $('#dSavingReviewForm').show(); } } 
    JavaScript é a melhor linguagem de programação de script e tem Node.js, AngularJS, vue.js e muitos bons framework JS.