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 Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

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 Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
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 Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Marlis
Calcite | Level 5

Many thanks to you, Quentin 🙂

 

Now I have understood the logic.

 

Best, Marlis

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 821 views
  • 2 likes
  • 2 in conversation