javascript - How can I make jQuery UI Dialogs open in a new window? -
i have web application has number of dialogs pop contain controls modify various attributes of data model. i'm displaying these dialogs using jquery ui dialog. new requirement users want able pop dialog out of current window. can create new window containing controls this:
function opensidebarinnewwindow(){ var dialogname = 'additionaldetailsdiv'; var openwindow=window.open("", "newwin", "height=250, width=250,toolbar=no,scrollbars="+scroll+",menubar=no"); openwindow.document.write("<html>"); openwindow.document.write("<title>" + dialogname + "</title>"); openwindow.document.write("<body>"); openwindow.document.write(window.document.getelementbyid(dialogname).innerhtml); openwindow.document.write("</body>"); openwindow.document.write("</html>"); }
but problem event handlers have on controls scoped parent window's "window". there way can modify function.prototype or on child page try call window.opener[function] if window[function] doesn't exist?
if not, can suggest better way handle situation?
Comments
Post a Comment