See FAQ:
http://docs.jquery.com/UI/Tabs#...prevent_switching_to_the_tab_on_click_depending_on_form_validation.3F

--Klaus


On Aug 31, 5:23 pm, oscarml <[EMAIL PROTECTED]> wrote:
> Hi to everybody,
>
> I'm trying to control tab switching depending on user answer to a
> dialog. Here is my code;
>
> var TabSolicitud = $('#SolicitudAguaTabContainer > ul').tabs({
>                 select: function(e, ui){
>                         $("#InfoDialog").html("Do you want to save changes?");
>                         $("#InfoDialog").dialog({
>                                 modal: true,
>                                 addClass: 'ModalInfo',
>                                 resizable: false,
>                                 title: "<img 
> src='imagenes/messagebox_info.png' class='img_title' />&nbsp; ",
>
>                                 overlay: {
>                                     opacity: 0.5,
>                                     background: "black"
>                                         },
>                                     buttons: {
>                                         "Yes": function() {
>                                                     $(this).dialog("close");
>                                                     SaveChanges();
>                                                  },
>                                         "NO": function() {
>                                                  $(this).dialog("close");
>                                                  return false;
>                                                  }
>
> });
>
> The problem is that when I show the dialog, the tab switched to the
> selected one. It doesn´t wait until it knows the answer of the user.
>
> What could I do?

Reply via email to