Hi, I'm currently working on a function which shows a inline dialog, so I can use html in the dialog box. In the dialogbox I've put a button to close the dialog box. If the button is clicked I want the function showDialog() to return a value. The problem is that it's out of the scope when I'm in the click() function. It there a solution?
this.showDialog = function(msg, buttons) { $('#inline_dialog').show().swapDepths(); var buttons = (buttons) || '<div class="clear-block"></div><div id="inline_alert_close_button"></div>'; $('#' + self.window_id).floatWinSetContent({content:msg + buttons, title:''}); $('#inline_alert_close_button').click(function() { $('#inline_dialog').hide(); return false; }); }