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.

 

 

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at 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.

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at 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.

 

 

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
Marlis
Calcite | Level 5

Many thanks to you, Quentin 🙂

 

Now I have understood the logic.

 

Best, Marlis

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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