0

オンラインでテンプレートを購入し、ウェブサイトを開発しようとしていますが、連絡先フォームで行き詰っています。なかなか提出できないようです。送信をクリックすると、静的なままになりますが、アクションを実行させたいのですが、contactTq.php ページに移動します。以下は、必要と思われるすべてのコードです。ただし、.js ファイル全体が必要な場合は、ここにあります: http://pastebin.com/1B1j9pkB

,submitFu:function(){
_.validateFu(_.labels)                          
if(!_.form.has('.'+_.invalidCl).length)
    $.ajax({
        type: "POST",
        url:_.mailHandlerURL,
        data:{
            name:_.getValFromLabel($('.name',_.form)),
            email:_.getValFromLabel($('.email',_.form)),
            phone:_.getValFromLabel($('.phone',_.form)),
            //fax:_.getValFromLabel($('.fax',_.form)),
            //state:_.getValFromLabel($('.state',_.form)),
            message:_.getValFromLabel($('.message',_.form)),
            owner_email:_.ownerEmail,
            stripHTML:_.stripHTML
        },
        success: function(){
            _.showFu()
        }
    })          
},
showFu:function(){
_.success.slideDown(function(){
    setTimeout(function(){
        _.success.slideUp()
        _.form.trigger('reset')
    },_.successShow)
})
},

使用しているフォームは次のとおりです。

<form id="contact-form" action="contactTq.php" method="post">
<div class="success"> Contact form submitted! <strong>We will be in touch soon.</strong></div>
<fieldset>
    <label class="name">
        <input type="text" value="Enter Your Name:">
        <span class="error">*This is not a valid name.</span>
        <span class="empty">*This field is required.</span>
        <span class="clear"></span>
    </label>
    <label class="email">
        <input type="text" value="Enter Your E-mail:">
        <span class="error">*This is not a valid email address.</span>
        <span class="empty">*This field is required.</span>
        <span class="clear"></span>
    </label>
    <label class="phone">
        <input type="text" value="Enter Your Phone (optional):">
        <span class="error">*This is not a valid phone number.</span>
        <span class="clear"></span>
    </label>
    <label class="message">
        <textarea>Enter Your Message:</textarea>
        <span class="error">*The message is too short.</span>
        <span class="empty">*This field is required.</span>
        <span class="clear"></span>
    </label>
    <div class="buttons"><strong><a class="button" data-type="reset">Reset<span></span></a></strong><strong><a class="button" data-type="submit">Submit<span></span></a></strong></div>
</fieldset>
</form>

他に情報が必要な場合は、お知らせください。助けていただければ幸いです。前もって感謝します!

4

1 に答える 1

0

コメントを回答に変更します。

終了 FORM タグがありません。それが原因ではない場合、FORM タグ内の data-ajax="false" が一部のテンプレートでうまくいくことがあります。

于 2013-03-15T04:11:41.923 に答える