Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>EDIT</strong></p> <p>OK, original answer was wrong. Your form is doing a POST but you are seeing two GET requests. Sorry about that. Missed it the first time around.</p> <p>Instead of writing out the script tag in HTML, why not just use the <a href="http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback" rel="nofollow noreferrer">$.getScript</a> function?</p> <pre><code>$('#enviar').click( function(evt) { var parametros = new Array(); parametros.push('nome=' + $('#nome').val()); parametros.push('email=' + $('#email').val()); parametros.push('emails_amigos=' + $('#emails_amigos').val()); $.getScript('&lt;!URL_PROCESS_FORM_DATA&gt;?' + encodeURL(parametros.join('&amp;') ), function() { // something you'd like to do afterwards }); }); </code></pre> <p><strike>It's because the form is submitting when the submit button is clicked and then your JS call is going though as well.</p> <p>You can stop that my connecting to the onsubmit in your form (instead of the onclick).</p> <p>Like so:</p> <pre><code> $("#id_to_your_form").submit(function() { var parametros = new Array(); parametros.push('nome=' + $('#nome').val()); parametros.push('email=' + $('#email').val()); parametros.push('emails_amigos=' + $('#emails_amigos').val()); $('#retorno_envio_form').html('\ &lt;script type="text/javascript" \n\ src="&lt;!URL_PROCESS_FORM_DATA!&gt;?' + encodeURI(parametros.join('&amp;')) + '"&gt;&lt;/script&gt;\n'); return false; }); </code></pre> <p>The <code>return false</code> will prevent the form from submitting.</p> <p></strike></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload