Você precisa adicionar a função ajax no open do dialog...

Fica mais ou menos assim:

$('a.vouchersBtn').click(
>
> function() {
>        vHref = $( this ).attr( 'href' );
>        cpf   = $( this ).attr( 'id' );
>
>        $( '#VoucherDialog' ).dialog({
>            title: "Vouchers - CPF: " + cpf,
>            modal: true,
>            buttons: {
>                'Ok': function() {
>
>
> $( this ).dialog( "close" );
>
>                }
>            },
>


open: function() {

        $.ajax({

                        url: vHref,

                        success: function( response ) {

                            $( '#VoucherDialog > p' ).html( response );

                        }

                    });
    }

       });
>
>        return false;
>    });



On 24 August 2011 17:12, Marcelo Diniz <[email protected]> wrote:

> Então pessoal, ate agora consegui abrir assim, tenho meu link
> <a href='conc_banc/vouchers/$cb->CPF' id='$cb->CPF' title='Ver os Vouchers'
> class='vouchersBtn'>$cb->QTD</a>
>
> Quando clico no link é para abrir um modal com os dados que vem do
> conc_banc/vouchers
>
> Só que quando clico não vem com nada, só quando clico no botao OK do modal
> que chama, alguem sabe me ajudar como abrir antes de eu clicar no botão OK
> do modal?
>
> $('a.vouchersBtn').click(function() {
>        vHref = $( this ).attr( 'href' );
>        cpf   = $( this ).attr( 'id' );
>
>        $( '#VoucherDialog' ).dialog({
>            title: "Vouchers - CPF: " + cpf,
>            modal: true,
>            buttons: {
>                'Ok': function() {
>                    $.ajax({
>                        url: vHref,
>                        success: function( response ) {
>                            $( '#VoucherDialog > p' ).html( response );
>                        }
>                    });
>                }
>            }
>        });
>
>        return false;
>    });
>
>
> --
> Marcelo Felipe Santiago Diniz
> [image: t_mini-a.png] @marcelo_leo27 <http://www.twitter.com/marcelo_leo27
> >
> _______________________________________________
> [email protected]
> http://www.codeigniter.com.br
> http://mail.codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br
>
> ---------------------------
> Oportunidade de negócio
> http://www.franquiasargohost.net
> ---------------------------
>
_______________________________________________
[email protected]
http://www.codeigniter.com.br
http://mail.codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br

---------------------------
Oportunidade de negócio
http://www.franquiasargohost.net
---------------------------

Responder a