bobz
07-06-2006, 12:06 PM
here is my code in javascript
i am trying to popup a window from the script itself. my ultimate goal is to attain showModalDialog quality to the windowm . i could not replace open with showModalDialog. is there anyother way to attain this quality to my window? plz suggest me here. thanks
function firstPopup() {
myWin= open("", "displayWindow","titlebar=no,width=275,height=200,status=no,titlebar=no,toolbar=no,menubar=no,location=no,directories =no,alwaysRaised=yes,outerWidth=1,outerHeight =1,left=350,top=200");
myWin.document.open();
myWin.document.write("<HTML>" );
myWin.document.write(" <HEAD >");
myWin.document.write(" <style> .message { position:absolute; top:10px; width:255px; height:25px; color: red; border: solid rgb(0,127,164); border-left-style: hidden; border-right-style: hidden; border-bottom-style: hidden; /* orange */ background-color: white ; } .message #button{ position:relative; color: black; visibility: visible; background-color: white ; } .button{ position:relative; color: black; border-width: 0px; border-style: solid; visibility: hidden; background-color: lightblue; } #myButton { position: absolute; right: 145px; bottom: 35px;} #cancelButton { position: absolute; right: 60px; bottom: 35px;} </style> ");
myWin.document.write(" <script language=\"javascript\" > var imp= null; function impor(){imp='norefresh';} ; function fcl(){ if(imp!='norefresh') { opener.reFreshCurWindow(); }} function func(s){ if(s==\"CONTINUE\"){opener.selectionofbutton(s);self.close();}else{opener.selectionofbutton(s);self.close(); }}function f1(){setInterval (\"window.focus()\",1)}; setTimeout('impor()',359999);</script> " );
myWin.document.write(" <TITLE> CCH WALL STREET - CRN</TITLE> </HEAD>");
myWin.document.write("<BODY bgcolor=white onUnload=\"fcl()\" onBlur=\"window.focus()\" onload=\"f1()\" ><form name=\"bobz\" method=\"get\" action=\"\"> <div class=\"message\"> <div id=\"button\" class=\"button\" > <h4> your CCH Research Network session will time-out in a few minutes due to inactivity. If you would like to continue your research, click the appropriate button below <h4> </div> </div> <div id=\"myButton\"> <input type=\"button\" name=\"CONTINUE\" value=\"CONTINUE\" onClick=\"impor(this.name) ,func(this.name)\"></div> <div id=\"cancelButton\"> <input type=\"button\" name=\"LOG OFF\" value=\"LOG OFF\" onClick=\"return func(this.name)\"></div></form>");
myWin.document.write("</BODY>")
myWin.document.write("</HTML>")
myWin.document.close();
setTimeout ('myWin.close()', 360000);
lastwin = setTimeout ("finalwindow()",360000);
}
i am trying to popup a window from the script itself. my ultimate goal is to attain showModalDialog quality to the windowm . i could not replace open with showModalDialog. is there anyother way to attain this quality to my window? plz suggest me here. thanks
function firstPopup() {
myWin= open("", "displayWindow","titlebar=no,width=275,height=200,status=no,titlebar=no,toolbar=no,menubar=no,location=no,directories =no,alwaysRaised=yes,outerWidth=1,outerHeight =1,left=350,top=200");
myWin.document.open();
myWin.document.write("<HTML>" );
myWin.document.write(" <HEAD >");
myWin.document.write(" <style> .message { position:absolute; top:10px; width:255px; height:25px; color: red; border: solid rgb(0,127,164); border-left-style: hidden; border-right-style: hidden; border-bottom-style: hidden; /* orange */ background-color: white ; } .message #button{ position:relative; color: black; visibility: visible; background-color: white ; } .button{ position:relative; color: black; border-width: 0px; border-style: solid; visibility: hidden; background-color: lightblue; } #myButton { position: absolute; right: 145px; bottom: 35px;} #cancelButton { position: absolute; right: 60px; bottom: 35px;} </style> ");
myWin.document.write(" <script language=\"javascript\" > var imp= null; function impor(){imp='norefresh';} ; function fcl(){ if(imp!='norefresh') { opener.reFreshCurWindow(); }} function func(s){ if(s==\"CONTINUE\"){opener.selectionofbutton(s);self.close();}else{opener.selectionofbutton(s);self.close(); }}function f1(){setInterval (\"window.focus()\",1)}; setTimeout('impor()',359999);</script> " );
myWin.document.write(" <TITLE> CCH WALL STREET - CRN</TITLE> </HEAD>");
myWin.document.write("<BODY bgcolor=white onUnload=\"fcl()\" onBlur=\"window.focus()\" onload=\"f1()\" ><form name=\"bobz\" method=\"get\" action=\"\"> <div class=\"message\"> <div id=\"button\" class=\"button\" > <h4> your CCH Research Network session will time-out in a few minutes due to inactivity. If you would like to continue your research, click the appropriate button below <h4> </div> </div> <div id=\"myButton\"> <input type=\"button\" name=\"CONTINUE\" value=\"CONTINUE\" onClick=\"impor(this.name) ,func(this.name)\"></div> <div id=\"cancelButton\"> <input type=\"button\" name=\"LOG OFF\" value=\"LOG OFF\" onClick=\"return func(this.name)\"></div></form>");
myWin.document.write("</BODY>")
myWin.document.write("</HTML>")
myWin.document.close();
setTimeout ('myWin.close()', 360000);
lastwin = setTimeout ("finalwindow()",360000);
}