BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Marlis
Calcite | Level 5

Hi,

 

how can I enforce to always open a new window (= browser tab) for the Output of a Stored Process.

 

At the moment the situation is:

For the first run of the SP a new browser tab is opened containing the output of the SP.

For the following runs the same browser tab is used as before.

 

We would prefer to always have the output in a new window, so the previous outputs are still available. 

 

We work with STPBEGIN and ODS HTML.

 

Thanks,

Marlis

1 ACCEPTED SOLUTION

Accepted Solutions
Quentin
Super User

Hi,

 

target="_blank" is not part of the URL.  It's part of the link.  So if you are making a web page that has a link to a stored process, the link in the html file might look like:

 

<a href="https://myserver/SASStoredProcess/do?&_program=/MyFolder/MyStoredProcess"> MyStoredProcess </a>

When user clicks that link, it would open the result in the same browser tab.

 

If you change the link to:

 

<a href="https://myserver/SASStoredProcess/do?&_program=/MyFolder/MyStoredProcess" target="_blank"> MyStoredProcess </a>

The stored process results would open in a new browser tab.

 

target= is an attribute of the link, not part of the URL.  See e.g.: https://www.w3schools.com/tags/att_a_target.asp.

 

-Q.

 

 

BASUG is hosting free webinars ! Check out recordings of our past webinars: https://www.basug.org/videos. Save the date for our in person SAS Blowout on Oct 18 in Cambridge, MA. Registration opens in September.

View solution in original post

4 REPLIES 4
Quentin
Super User

Hi,

 

Depends how you are calling the stored process.  But could be as simple as adding target="_blank" to the link.

 

--Q.

BASUG is hosting free webinars ! Check out recordings of our past webinars: https://www.basug.org/videos. Save the date for our in person SAS Blowout on Oct 18 in Cambridge, MA. Registration opens in September.
Marlis
Calcite | Level 5

Thank you, Quentin!

 

I tried to intergrate this information into  the URL calling the SP.

So I changed

" .... /do?&_program=/ .... " to

 

" .... /do?&_action=newwindow&target="_blank"&_program=/ .... ".

 

I tried different versions of syntax (with/without _  or single/double quotation marks).

But nothing has changed.

 

Does anybody know the right syntax?

Quentin
Super User

Hi,

 

target="_blank" is not part of the URL.  It's part of the link.  So if you are making a web page that has a link to a stored process, the link in the html file might look like:

 

<a href="https://myserver/SASStoredProcess/do?&_program=/MyFolder/MyStoredProcess"> MyStoredProcess </a>

When user clicks that link, it would open the result in the same browser tab.

 

If you change the link to:

 

<a href="https://myserver/SASStoredProcess/do?&_program=/MyFolder/MyStoredProcess" target="_blank"> MyStoredProcess </a>

The stored process results would open in a new browser tab.

 

target= is an attribute of the link, not part of the URL.  See e.g.: https://www.w3schools.com/tags/att_a_target.asp.

 

-Q.

 

 

BASUG is hosting free webinars ! Check out recordings of our past webinars: https://www.basug.org/videos. Save the date for our in person SAS Blowout on Oct 18 in Cambridge, MA. Registration opens in September.
Marlis
Calcite | Level 5

Many thanks to you, Quentin 🙂

 

Now I have understood the logic.

 

Best, Marlis

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 933 views
  • 2 likes
  • 2 in conversation