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

Popular posts from this blog

actionscript 3 - TweenLite does not work with object -

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

c# - Global Variables vs. ASP.NET Session State -