Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9047799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:59:25+00:00 2026-06-16T11:59:25+00:00

I have a form that works just fine when I try it out (with

  • 0

I have a form that works just fine when I try it out (with the correct address of course).

When I use that for in my site, inside a fancybox it doesn’t work. Nothing happens (no error in the console either).

The relevant code is:

<a class="fancybox" href="#inline1" id="link_consultar">
  Consultar
</a>
<div style="display: none">
  <div id="inline1">
    Producto: {$product->
    name|escape:'htmlall':'UTF-8'}
    <br>
    <br>
    <form id="myForm" action="http://danielvi.com/send_mail.php" method="post">
      Nombre: 
      <input type="text" name="firstname">
      <br>
      <br>
      Consulta:
      <br>
      <textarea rows="4" cols="50">
      </textarea>
      <br>
      <br>
      <input type="submit" value="Enviar Consulta" />

    </form>
  </div>
</div>

The JS:

$(document).ready(function() {
    $('#myForm').submit(function(){
        alert("submitted");
    });
});

I have also tried:

$(document).ready(function() {
    $("#myForm").on("submit", function(event){
        alert("submitted");
    });        
});

I have included the form plugin like this:

<script src="http://malsup.github.com/jquery.form.js"></script>

With no success, the end goal is to send form by AJAX, this is a simplified example to debug.

What I don’t understand either is that even when I remove all js it wont direct me to the action page.

You can see a live example here (When you click consulta).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T11:59:27+00:00Added an answer on June 16, 2026 at 11:59 am

    The problem is shown on your live site. Upon examining the source code, you can see that you’re adding a form within another form

    <form id="buy_block"  action="http://danielvi.com/index.php?controller=cart" method="post">
        [...]
        <form id="myForm" action="http://danielvi.com/send_mail.php" method="post">
             [...]
        </form>
    </form>
    

    Which invalidates the second form you’re working with. That is why it’s not doing anything. Other than that, the code is valid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an C# form application that use an access database. This application works
I have an app that works just fine on my WinXP machine. However, when
I have a continuous form that works when I manually open it. However when
I have a form that calls on two separate models. My validation works correctly
I currently have form that checks if a user has unsubmitted changes when they
I have a form that I'm submitting through AJAX. The form includes many fields,
I have a form that I want to be validated before showing it initially.
I have a form that sends money value e.g <input type=text name=amount value=N50,000.00 NGN
I have a form that includes the first name and last name of a
I have a form that has label values that I would like to pass

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.