Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/07/2012, 14:44
alvarols
 
Fecha de Ingreso: diciembre-2008
Mensajes: 738
Antigüedad: 15 años, 4 meses
Puntos: 15
Pasar una variable PHP con jQuery Fancybox

Tengo un código donde por medio de Ajax, un formulario me muestra el resultado de una variable PHP, este es el código de Ajax:

Código Javascript:
Ver original
  1. <script type="text/javascript">
  2.  
  3.     document.contactform.browser_check.value = "true"; //sets the hidden input(browser_check) value as true if the javascript is enabled.
  4.        
  5.      $("#submit").click(function(){
  6.      
  7.         $('#result').html('<img src="http://www.tutorialstag.com/examples/images/loader.gif" class="loading-img" alt="loader image">').fadeIn();
  8.         var input_data = $('#form').serialize();
  9.                 $.ajax({
  10.                    type: "POST",
  11.                    url:  "<?php echo "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>",
  12.                    data: input_data,
  13.                    success: function(msg){
  14.                        $('.loading-img').remove(); //Removing the loader image because the validation is finished
  15.                        $('<div class="message">').html(msg).appendTo('div#result').hide().fadeIn('slow'); //Appending the output of the php validation in the html div
  16.                    }                       
  17.                 });
  18.                
  19.             return false;
  20.            
  21.       });  
  22.  
  23.     </script>

Lo que quiero es mostrarlo en un recuadro por medio del jQuery Fancybox, porque este plugin hace que se abran recuadros por medio de links. La cosa es como pasar ese link al recuadro. Este es el link que tengo que usar:

<a id="iframe" href="individual.php">Ver más</a></td>