Re: [jQuery] prompt before closing dialog

2009-12-17 Thread Shawn
in your buttons definition: buttons : { "Close" : function () { if (!formChanged()) { $("#myDialog").dialog("close"); } else { $("#confirm").dialog("open

Re: [jQuery] prompt before closing dialog

2009-12-17 Thread Richard D. Worth
Handle the beforeclose event and return false if you don't want to allow the dialog to close yet: http://docs.jquery.com/UI/Dialog#event-beforeclose If you have any further questions, there's a separate list for questions about jQuery UI plugins: http://groups.google.com/group/jquery-ui - Richa

Re: [jQuery] prompt before closing dialog

2009-12-17 Thread Dhruva Sagar
If you provide your function for the close event you should be able to achieve this. It should return false in case you don't want it to close (in my opinion) Thanks & Regards, Dhruva Sagar. On Thu, Dec 17, 2009 at 3:40 PM, Obi1 wrote: > Hi, i'm having some trouble because i'm using a dialog

[jQuery] prompt before closing dialog

2009-12-17 Thread Obi1
Hi, i'm having some trouble because i'm using a dialog witch has a form in it where someone can change info about their hotel. this dialog also has 2 buttons one to close and the other to save changes. what i'm trying to accomplish is - when someone made sany change and tries to close de dialog wit