The issue is in jquery library: trying <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/ jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.2/ jquery-ui.min.js"></script>
works fine. I will update them Thanks for answering On 21 nov, 09:49, oscarml <[EMAIL PROTECTED]> wroe: > Hi, > I've posted it inhttp://jsbin.com/ikexobut... now is working :S > > I dont know why is not working in my server. The only difference > between my code and this one is that the ModalConBotones function, in > my case is not placed in the same html page where the other 2 are. > It's in a js included in the main index.php. I'm not really good in > javascript, but its hard to believe that this is the reason, isnt it? > > Any way, I'm gonna check my code again. > > Thanks > > On 20 nov, 12:51, "Richard D. Worth" <[EMAIL PROTECTED]> wrote: > > > Sorry, I wasn't able to reproduce your issue. Could you provide a complete > > running code sample, maybe onhttp://jsbin.com/?Thanks. > > > - Richard > > > On Thu, Nov 20, 2008 at 3:12 AM,oscarml<[EMAIL PROTECTED]> wrote: > > > > Nobody can help? > > > > On 17 nov, 18:09,oscarml<[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > > I need to set programmatically the buttons in a confirm buttoned > > > > dialog, but I am having several issues: > > > > > This is the code I'm using: > > > > > The function that creates and opens the dialog: > > > > > function ModalConBotones(Texto,botones,dialogID){ > > > > $('#'+dialogID).dialog({ > > > > modal: true, > > > > autoOpen: false, > > > > addClass: 'ModalInfo', > > > > resizable: false, > > > > overlay: { > > > > opacity: 0.5, > > > > background: 'black' > > > > }, > > > > buttons: botones, > > > > height:150, > > > > width:400 > > > > }); > > > > $('#'+dialogID).html(Texto); > > > > $('#'+dialogID).dialog("open"); > > > > } > > > > > And then I call it from several places: > > > > > function1(){ > > > > var buttonsF1 = {}; > > > > buttonsF1 ["buttonF1_1"] = function(){ > > > > //do something > > > > $(this).dialog("close"); > > > > }); > > > > buttonsF1 ["buttonF1_2"] = function(){ > > > > //do something > > > > $(this).dialog("close"); > > > > }); > > > > ModalConBotones("TextoF1",buttonsF1,'InfoDialogBoton'); > > > > > } > > > > > function2(){ > > > > var buttonsF2 = {}; > > > > buttonsF2 ["buttonF2_1"] = function(){ > > > > //do something > > > > $(this).dialog("close"); > > > > }); > > > > buttonsF2 ["buttonF2_2"] = function(){ > > > > //do something > > > > $(this).dialog("close"); > > > > }); > > > > ModalConBotones("TextoF2",buttonsF2,'InfoDialogBoton'); > > > > > } > > > > > The issue: > > > > When I call function1, everything shows ok, a dialog with TextF1 and > > > > buttonsF1. Perfect. > > > > When I call function2, I get a dialog with TextF2 (perfect), but the > > > > buttons are buttonsF1!!!!!!! > > > > > I've tried calling dialog("destroy") in ModalConBotones before > > > > initializing the dialog, but then, the neither TextF1 or TextF2 > > > > appears. With firebug I have seen that the dialog keeps > > > > style="display:none" > > > > > Any idea? > > > > > I think I could change with jquery the style to display: block when I > > > > initialize the dialog, but I think this is not smart enough. > > > > > Thanks for your time, hope it was clear enough. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
