Hi klaus, I had already read the FAQ, and as you can see in my code I'm using the select property. This works fine for example if you run a function that returns true or false without asking user anything, but in my case I need the user to choose one option. Then, when I offer the dialog box, the code inside the 'select' property is returning true, before the user press a button.
Any idea? On 1 sep, 06:18, Klaus Hartl <[EMAIL PROTECTED]> wrote: > See > FAQ:http://docs.jquery.com/UI/Tabs#...prevent_switching_to_the_tab_on_cli... > > --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' /> ", > > > 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?

