Focal Point
[CLOSED] Dealy window.open function in maintain js

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7977004136

June 11, 2013, 07:26 AM
Shankar
[CLOSED] Dealy window.open function in maintain js
Hi All,
I have a Read/Write Grid in which one column is clickable(with links). On clicking this, In background it runs a unix job (to compose a zip file) which takes around 10 secs to complete. On completion of unix job, I want to pop-up a new window which basically pop-up the zip file to user (through soft link). I want to delay the opening of new window by 10 sec so that unix job get completed and on accesing the link, it finds the zip file at the desired location.
My Lclick event code look like below:

 
function OnGrid1_OnLClicked ( int col, long row, boolean updn, boolean processed)  {
if (col == 10)
{
amcsetup.Grid1.GetCell(0,row);
var StrCellGet1 = amcsetup.Grid1.CellGetText;
//alert(StrCellGet1);
//Provider.Grid2.GetCell(1,row);
//var StrCellGet1 = Provider.Grid2.CellGetText;
//alert (StrCellGet);
//IWCTrigger("GetFundleveldata",StrCellGet); 
IWCTrigger("GenerateExt",StrCellGet1);
window.open("https://wbfdev1.uk.fid-intl.com:15002/solvency/Reports.zip");
}
}
 


}
In above code GenerateExt function is used to invoke unix jobs (through fex files). Ideally it should open the new window after execution of GenerateExt function but I observed that, the new window opens up immediately before the function GenerateExt finishes its execution due to which it throws '404 Not Found ' error. i.e, it is not able to find the zip file at the mentioned location. When I copy the url in other tab it works absolutely fine.
How can I delay the opening of new window by 10sec (approx) or it only opens when GenerateExt function finishes its execution.?
Please advice.

Thanks in advance.

This message has been edited. Last edited by: <Kathryn Henning>,


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
June 13, 2013, 03:25 AM
Alan B
I would open a window with an html page that contains an onopen js function with an ajax request to return the file. The file name can be passed over in the url and stripped out with the js function.


Alan.
WF 7.705/8.007