Pass variable Javascript POST does not work

0

I'm not able to pass the value of <input name="i_content"> to javascript.

I'm doing this:

<form url="deletar_convidado.php" method="post" id="reg-form_3<?php echo $i_content ?>" autocomplete="off" style="border:none;  float:left; width:50px">           
  <input type="hidden" name="i_content" id="i_content" value="<?php echo $i_content ?>">
  <input type="hidden" name="auxiliar_evento_usuarioss" id="auxiliar_evento_usuarioss" value="<?php echo $produto["auxiliar_evento_usuario"] ?>">
   <input type="hidden" name="deletar_convidado" id="deletar_convidado" value="<?php echo $row_convidado['id']; ?>">
    <button class="btn btn-info lista_convidado_1" type="submit"><i class="entypo-cancel-circled"></i></button> 
</form> 




$(document).on('click', '#reg-form_3'+$("#i_content").val(), function(e){

        e.preventDefault(); 

        $.ajax({
            url: 'deletar_convidado.php',
            type: 'POST',
            data: $(this).serialize() 
        })
        .done(function(data){
            $('#form-content_2'+$("#i_content").val()).fadeOut('slow', function(){
                $('#form-content_2'+$("#i_content").val()).fadeIn('slow').html(data);
            });
        })
        .fail(function(){
            alert('Ajax Submit Failed deletar convidado...');    
        });
     });

Where is the error?

    
asked by anonymous 04.04.2017 / 14:28

0 answers