Hi ,
I am trying to open a modal window but if t he window is already opened i need to just set the focus back .
The Code is working fine in one environment but not live system
on live system every time a window gets opened irrespective of an existing window.
What i Assume is that
[CODE=javascript]htp.p(' function disp() {');
htp.p(' MyTimeOutWin = window.open("", "TimeOut")' );
htp.p(' if (window.MyTimeO utWin) {');
htp.p(' if (iWindowCounter == 0) {');
htp.p(' MyTimeOutWin.cl ose();');
htp.p(' iWindowCounter= iWindowCounter+ 1 ');
htp.p(' var TimeoutWindow = window.showModa lDialog(''PSOR_ TIMEOUT_WINDOW' ', ''TimeOut'','||
' "dialogWidth=43 0px; dialogHeight=47 0px;status=yes" )' );
htp.p(' } else { ');
htp.p(' MyTimeOutWin.fo cus();');
htp.p(' }');
htp.p(' } else {');
htp.p(' var TimeoutWindow = window.showModa lDialog(''PSOR_ TIMEOUT_WINDOW' ', ''TimeOut'','||
' "dialogWidth=43 0px; dialogHeight=47 0px;status=yes" )' );
htp.p('}');
htp.p(' if ((TimeoutWindow !="ClosedCorrec tly") && (TimeoutWindow !="CloseAll") ) {');
htp.p(' iWindowCounter = 0');
htp.p(' disp() ');
htp.p(' } else {');
htp.p(' iWindowCounter = 0');
htp.p(' }');
htp.p(' var i = 0;');
htp.p(' if (TimeoutWindow =="CloseAll") {');
htp.p(' window.parent.l ocation.href="' ||rGIrec.GI_BAS E_URL|| rGIrec.GI_BASE_ PLS ||'/psor000"');
htp.p(' window.open(''' ||rGIrec.GI_BAS E_URL|| rGIrec.GI_BASE_ PLS ||'/psor000'',''_pa rent'','''');') ;
htp.p(' window.opener=n ull ');
htp.p(' window.parent.c lose(true);');
htp.p(' } ');
htp.p(' }');
[/CODE]
Please suggest
I am trying to open a modal window but if t he window is already opened i need to just set the focus back .
The Code is working fine in one environment but not live system
on live system every time a window gets opened irrespective of an existing window.
What i Assume is that
[CODE=javascript]htp.p(' function disp() {');
htp.p(' MyTimeOutWin = window.open("", "TimeOut")' );
htp.p(' if (window.MyTimeO utWin) {');
htp.p(' if (iWindowCounter == 0) {');
htp.p(' MyTimeOutWin.cl ose();');
htp.p(' iWindowCounter= iWindowCounter+ 1 ');
htp.p(' var TimeoutWindow = window.showModa lDialog(''PSOR_ TIMEOUT_WINDOW' ', ''TimeOut'','||
' "dialogWidth=43 0px; dialogHeight=47 0px;status=yes" )' );
htp.p(' } else { ');
htp.p(' MyTimeOutWin.fo cus();');
htp.p(' }');
htp.p(' } else {');
htp.p(' var TimeoutWindow = window.showModa lDialog(''PSOR_ TIMEOUT_WINDOW' ', ''TimeOut'','||
' "dialogWidth=43 0px; dialogHeight=47 0px;status=yes" )' );
htp.p('}');
htp.p(' if ((TimeoutWindow !="ClosedCorrec tly") && (TimeoutWindow !="CloseAll") ) {');
htp.p(' iWindowCounter = 0');
htp.p(' disp() ');
htp.p(' } else {');
htp.p(' iWindowCounter = 0');
htp.p(' }');
htp.p(' var i = 0;');
htp.p(' if (TimeoutWindow =="CloseAll") {');
htp.p(' window.parent.l ocation.href="' ||rGIrec.GI_BAS E_URL|| rGIrec.GI_BASE_ PLS ||'/psor000"');
htp.p(' window.open(''' ||rGIrec.GI_BAS E_URL|| rGIrec.GI_BASE_ PLS ||'/psor000'',''_pa rent'','''');') ;
htp.p(' window.opener=n ull ');
htp.p(' window.parent.c lose(true);');
htp.p(' } ');
htp.p(' }');
[/CODE]
Please suggest
Comment