You can change this behavior, but it involves replacing one of the JavaScript files that we ship. See the comments within the code to set the features you desire. In your case, you will need to set the value of the variable
SAS_ResultsNewWindow to
false. Note that this change will affect all stored processes.
DISCLAIMER: This code has not been fully tested; use it at your own risk.
Below are the steps. Step 2 is specific to the Tomcat Application Server, and you will need to adjust the path if you are using a different Java Application Server. The rest of the steps are the same, regardless of the application server.
- Stop your Java Application Server.
- Navigate to
<Tomcat-install-directory>\webapps\SASStoredProcess\scripts\
- Rename the file
dynamicPP_navigate.js
to
dynamicPP_navigate.js.ORI
- Create a new file named
dynamicPP_navigate.js
and open it using a text editor.
- Copy and paste the code below into the file
dynamicPP_navigate.js
and save the file. In the code below,
Red
indicates new code and
blue
indicates changed code, with the changes
highlighted in yellow.
- Set the values of the variables
SAS_HideExecutionOptions, SAS_HTTPMethod,
and
SAS_ResultsNewWindow
to suit your needs.
- Restart your Java Application Server and execute a stored process to confirm the desired behavior.
For important information regarding execution options in SAS 9.2, see:
Usage Note 35063: Stored process execution options are no longer included in SAS® 9.2 by default
http://support.sas.com/kb/35/063.html
Vince DelGobbo
SAS R&D
[pre]
// Set SAS_HideExecutionOptions to true to hide the Execution Options, or false to show them
var SAS_HideExecutionOptions=false;
// Set SAS_HTTPMethod to GET to change the HTTP method from default value of POST to GET
var SAS_HTTPMethod="post";
// Set SAS_ResultsNewWindow to false to change force SAS output to be opened in the same window
var SAS_ResultsNewWindow=true;
// Highlight selected menu item and display the corresponding content
function showContent(menuItemName, menuAnchorName, contentElementName) {
/* Copyright(c) 2003-2004 by SAS Institute Inc., Cary, NC USA All rights reserved. */
var anchors, contentElement, contentWindow, i, size, menuElement;
// selectedLeftMenuItem, visibleContentElementName and menuAnchorElement are global
if (SAS_HideExecutionOptions == true) {
anchors = document.getElementsByTagName("a");
size = anchors.length;
for (i = 0; i < size; i++) {
href = anchors[i].href;
if (href.indexOf("AdvancedServerOptions") >= 0) {
anchors[i].style.display="none";
}
}
if (visibleContentElementName == "AdvancedServerOptions")
return;
}
// Set the HTTP method on the Execution Options panel if GET is requested
if (SAS_HTTPMethod.toLowerCase() == "get") {
document._advancedOptions.httpmethod[0].checked = true;
document._advancedOptions.httpmethod[1].checked = false;
}
// Set the "Display results in new window" option on the Execution Options panel to "No" if requested
if (SAS_ResultsNewWindow == false) {
document._advancedOptions.resNewWindow[0].checked = false;
document._advancedOptions.resNewWindow[1].checked = true;
}
menuAnchorElement = document.getElementById(menuAnchorName);
// Hide the currently visible element
contentElement = document.getElementById(visibleContentElementName);
contentElement.style.display = "none";
// Show the desired element
contentElement = document.getElementById(contentElementName);
contentElement.style.display = "";
menuElement = document.getElementById(menuItemName);
// Deselect previously selected menu item, if any
if (selectedLeftMenuItem != null)
selectedLeftMenuItem.className="portalTabVert";
// Select the clicked on menu item
menuElement.className="portalActiveTabVert";
selectedLeftMenuItem = menuElement;
visibleContentElementName = contentElementName;
window.setTimeout("menuAnchorElement.focus();", 200);
}
[/pre]