Hi Gustavo,
You need to use an expando or a global variable to store the href of
the clicked confirmador as part of the click event before you call the
dialog then use it in the dialog call.
Something like this (untested!):
$(function(){
$('#dialog').dialog({
autoOpen: false,
bgiframe: true,
resizable: true,
modal: true,
buttons: {
'Cancelar': function(){
$(this).dialog('close');
},
'Continuar': function(){
window.location= $(this).data("goto");
}
}
});
$('.confirmador').click(function(){
$('#dialog').data("goto", $(this)attr
("href")).dialog('open');
return false;
});
});
Hth,
Dave
On Jun 7, 11:25 am, Gustavo <[email protected]> wrote:
> Hello, I developed a confirm script with jQuery UI and I thought
> everything was fine until I noticed it only sent one result all the
> time:
>
> $(function(){
> $('#dialog').dialog({
> autoOpen: false,
> bgiframe: true,
> resizable: true,
> modal: true,
> buttons: {
> 'Cancelar': function(){
> $(this).dialog('close');
> },
> 'Continuar': function(){
> window.location=
> $('.confirmador').attr('href');
> }
> }
> });
> $('.confirmador').click(function(){
> $('#dialog').dialog('open');
> return false;
> });
> });
>
> So basically, it sends the first value of href with a 'confirmador'
> class.
>
> My Question is:
>
> How can I get it to send the value of the href attribute of
> the .confirmador that is clicked and not just send the first result
> all the time?
>
> jQuery - Latest
> jQuery UI - Latest
>
> Any help would be appreciated.
>
> Thanks,
> Gustavo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---