Usage Note 23347: In ODS HTML output, how can I add a button to the table of contents?
Although this cannot be done with PROC TEMPLATE as of Release 8.2, this can
be done with ODS by appending the button to the bottom of the
table of contents. The NO_BOTTOM_MATTER or the alias NOBOT suboption
can be used on the ODS HTML statement to append to the file.
View output.
/* The below example will open a file in the main window */
filename bod 'C:\test\Z1.html';
filename cont 'C:\test\Z2.html' mod;
filename frame 'C:\test\Z3.html';
ods html body=bod
contents=cont( nobot)
frame=frame ;
proc print data=sashelp.class;
run;
proc report data=sashelp.class nowd;
run;
ods html close;
data _null_;
file cont ;
put '<form>';
put '</ul>';
put '<INPUT TYPE="button" VALUE="Click To"
onClick=javascript:window.open "c:\\test\\Z1.html","body")>';
put '</form>';
put '</body>';
put '</html>';
run;
/* The below example takes you back to the previous process */
filename bod 'C:\test\body.html';
filename cont 'C:\test\cont.html' mod;
filename frame 'C:\test\frame.html';
ods html body=bod(url='body.html')
contents=cont(url='cont.html' nobot)
frame=frame(url='frame.html') ;
proc print data=sasuser.class;
run;
proc report data=sasuser.class nowd;
run;
ods html close;
data __null_;
file cont ;
put '<form>';
put '<input type="button" value="Back" onclick="history.back()">';
put '</ul>';
put '</form>';
put '</body>';
put '</html>';
run;
/* The below example works with SAS/INTRNET */
ods listing close;
ods html frame= _webout (dynamic)
body=b.html newfile=table
contents=c.html (no_bottom_matter)
path=&_tmpcat (url=&_replay)
rs=none;
data one;
x=1;
proc print;
run;
data two;
y=2;
proc print;
run;
ods html close;
filename c catalog "&_tmpcat..c.html" mod;
data _null_;
file c;
put '</ul><p>
<a href="javascript:history.back(0)">Return to Previous Page</a>
</body></html>';
run; quit;
See also the full PROC TEMPLATE FAQ and Concepts.
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Usage Note |
| Priority: | low |
| Topic: | SAS Reference ==> ODS (Output Delivery System) Third Party ==> Output ==> HTML
|
| Date Modified: | 2003-09-22 11:17:10 |
| Date Created: | 2003-08-08 13:52:18 |