Your SAS programs, embedded in web apps and elsewhere

Is there a way to automatically close the window of a stored process when it's done?

Reply
Frequent Contributor
Posts: 127

Is there a way to automatically close the window of a stored process when it's done?

[ Edited ]

Hello,

 

I'm execting a STP in a new from my main web page.

<form target="_blank" action="http://<UrlToMySTP>" method="get" enctype="multipart/form-data">

And I would like it to close automatically when it's done.

I tried to do this in JavaScript, 

data _null_;
    file _webout;
    put '<HTML>';
    put '   <HEAD>';
    put '   </HEAD>';
    put '   <BODY onLoad="window.close()">';
    put '   </BODY>';
    put '</HTML>';
    run;

but the browsers don't allow that (security vulnerability)

Scripts may close only the windows that were opened by it.

 

Is there another way to close the page?

Thanks!

SAS Employee
Posts: 295

Re: Is there a way to automatically close the window of a stored process when it's done?

Can you explain why you want to do that or what you're trying to achieve?  There may be a different way to get the result that you need.

 

Vince DelGobbo

SAS R&D

Ask a Question
Discussion stats
  • 1 reply
  • 120 views
  • 0 likes
  • 2 in conversation