• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
form action without redirect

Hello guys, I need help here.

I need call a controller/function without redirect.

I need stay in the same page and not reload that page, just call a function in controller.

i don't know if have other methods without using form.

Help me please. 

Thanks for now.

here my code in a modal

PHP Code:
<div class="modal fade" id="add">
   <div class="modal-dialog">

       <div class="modal-content">
<div class="modal-header">
               <button class="close" data-dismiss="modal">
               <h4 class="modal-title">Participantes</h4>

           <div class="modal-body row">
               <div class="col-md-12" >
                   <div class="row text-center"   
<?php echo form_open('webconf/adicionarParticipante'); ?>  
                          <input type="text" name="idChamada" id="idChamada" hidden value="">         
                        <?php foreach ($participantes as $usuario) {?>
                          <?php if($usuario->codigo <> $userID) { ?>
                            <div class="participante" id="imagemChecked">
                                <img class="img-participante" id="imgParticipante" src="<?php echo IMG'h2.jpg' ?>" alt="...">
                                <input type="checkbox" name="imgCheck[]" id="imgCheck" value="<?php echo $usuario->codigo;?>"></input>
                                <h4><?php echo $usuario->nome?></h4>
                          <?php }} ?>                  

            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal" >Cancelar</button>
                <button type="submit" id="btn-chamar" class="btn btn-primary" disabled>Chamar</button><br />               


You will need AJAX to accomplish this.
If your website is already using Jquery, this is not difficult at all.

Look here for a few good examples.

Thanks Man!!!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.