problem -- modal dialog box
-
hi i have opened a modal dialog box using following script retSearch = window.showModalDialog('SearchCompany.aspx',oArg,'status:no;dialogHide:false;help:no;scroll:yes'); problem is when i submit SearchCompany.aspx form i get result in a new browser window , how may get the result to be in same browser window i have used target option of frame = "_self" , which is suppose to open page in same window !! any helps the dialog window works with html file ! problem occurs only when i use asp/aspx page i.e. when i submit window ! any idea whats wrong !! ? P.S. PATWAL
-
hi i have opened a modal dialog box using following script retSearch = window.showModalDialog('SearchCompany.aspx',oArg,'status:no;dialogHide:false;help:no;scroll:yes'); problem is when i submit SearchCompany.aspx form i get result in a new browser window , how may get the result to be in same browser window i have used target option of frame = "_self" , which is suppose to open page in same window !! any helps the dialog window works with html file ! problem occurs only when i use asp/aspx page i.e. when i submit window ! any idea whats wrong !! ? P.S. PATWAL
If you are going to do *ANY* navigation in a dialog, you need to have the dialog embed an iframe... otherwise it will open a new browser window. below is an example of a dialog "host" than can be reused. When the inner frame document wants to close the dialog, simply set the parent.returnValue = "R", rather than window.close(). Hope this helps... Copy Alert Matrix <!-- var g_iInterval = 0; var g_iLoop = 0; function window_onload() { document.all["MatrixCopy"].style.display = ""; document.all["LoadingMsg"].style.display = "none"; window_onresize(); window.returnValue = ""; // default to empty string g_iInterval = window.setInterval("CheckForSave()",500); } function CheckForSave() { if (window.returnValue == "R") { g_iLoop++; if (g_iLoop > 2) { window.clearInterval(g_iInterval); window.close(); } } } function window_onresize() { var oLP = document.all["MatrixCopy"]; oLP.style.posHeight = document.body.offsetHeight; oLP.style.posWidth = document.body.offsetWidth; } //--> Loading...