jquery - what is return type of window.open() in Javascript -
i writing code download pdf file using window.open()
. passing url path of pdf file on server.
window.open(url, name, "width=910,height=750,scrollbars=yes");
i want check if downloading of file successful or not. return type of window.open()
?
i tried
try { window.open(url, name, "width=910,height=750,scrollbars=yes"); alert("success"); } catch(e) { alert("failer"); }
when change url wrong url, shows same result success.
http://www.javascripter.net/faq/openinga.htm
the return value reference new window. can use reference later, example, close window (winref.close()), give focus window (winref.focus()) or perform other window manipulations.
Comments
Post a Comment