// Generated by SAS macro jsWriter 04APR02:17:23:58 // Richard A. DeVenezia // http://www.devenezia.com function title1 () { document.write ( "
Richard A. DeV"
+ "enezia
http://www.devenezia.com
If you find these mac"
+ "ros useful, please let me know
I have developed a suite of" + " macros to enable long titles or footnotes when working with ODS HTML. The macros store Title and Fo" + "otnote information in a separate file in specially constructed javascript functions. The macros als" + "o generate SAS Title and Footnote statements that are formulated to invoke the javascript functions." + " Thus, when the ODS HTML created page is accessed by a web browser the title and footnote informati" + "on is delivered to the reader.
Macros and Usage:fileref - a FILEREF defined using a FILENAME statement.
The fi" + "leref is where javascript functions will be written. The file should not be the same file that " + "ODS HTML is writing to. The ODS HTML HEADTEXT= option should be used to ensure the generated javasc" + "ript file is available to the generated HTML.
N - The title or footnote number, "
+ "1 through 10.
text - Text to be displayed as the title.
By default the title or f" + "ootnote is left-justified. To override this default, wrap text in a <P> block with ALIG" + "N=CENTER|RIGHT|JUSTIFY.
The text may contain direct HTML for embedding. Best result" + "s are experienced if the HTML is valid. If you want to display characters normally interpreted by t" + "he SAS macro system, pass the text wrapped in %nrstr(). If you experience SAS errors while u" + "sing the macros while trying to work with special characters, consider using HTML entities discussed in the HTML 4.0 Specification.
URL - The URL where the javascript file should be loaded from
For si" + "mple uses of %jsTitle and %jsFootnote the fileref indicated in %jsTitleFootn" + "oteReset will point to a file in the same folder as the HTML file being created by ODS HTML. Th" + "is means the filename itself is sufficient to pass as the URL.
In more sophisticated " + "uses, the fileref indicated in %jsTitleFootnoteReset will point to a file in a folder " + "different than that of the HTML file being created by ODS HTML. This means the location of the javas" + "cript file when accessed through your web browser must be known. For pages that are read directly of" + "f a disk or shared drive this means some relative or absolute path according to the local system. Fo" + "r pages that are read from web server this means some relative or absolute path according to the web" + " server.
jsODSHeadText is a convenience macro for use when specifing the value to use in yo" + "ur ODS HTML HEADTEXT=. The macro generates this literal text:
<SCRIPT LANGUAGE="" + ""JAVASCRIPT"" SRC=""&URL""></SCRIPT>
which wh" + "en used as a HEADTEXT= value will cause this:
<SCRIPT LANGUAGE="JAVASCRIPT"" + " SRC="&URL"></SCRIPT>
to appear in the ODS HTML <HEAD>.
" + "Note: Your application may require HEADTEXT other than that needed by these macros.
%let htmlFolder =" + " some-local-system-path;
%let jScriptFilename " + "= some-filename;
filename jScript "&htmlFolder.\\&jScri" + "ptFilename.";
%jsTitleFootnoteReset ( j" + "Script );
ODS HTML body = "&htmlFolder.\\html-filename"
headtext="your head text
" + " %jsODSHeadText ( &jScriptFilename )
" + " "
;
%jsTitle (1, Title (may include <b>HTML</b> itself))
.." + ".
ODS HTML CLOSE;
If you try to set a title or footnot" + "e that has a <PRE> block that covers mutiple lines, everything will run together. This is bec" + "ause the SAS macro system translates newlines to spaces. Use <BR> tags to ensure newlines occ" + "ur where you want them.
These macros bypass the ODS renderer, thus, inline styling directiv" + "es indicated by \\S will not be ODS rendered.
So, make your titles as long as you want. The more the in" + "formation the better. The same goes for the footnotes. There is pratically no limit to how long the " + "titles and footnotes can be. Actually, they should not be more than 65536 characters long.
Y" + "ou may reuse a title number within a given block of code that writes to an HTML file. What this mea" + "ns is that jsTitle() and jsFootnote() keep track of how many times they have been called since jsTit" + "leFootnoteReset() and keep same numbered titles and footnotes in separate javascript functions.
" + "Very long titles and footnotes in HTML enables you to:
Thus ends TITLE 1.
" ); } function footnote2 () { document.write ( "This is footnote 2 output by macro jsFootnote(), jsTitleAndFootnote defaults to left-alignment" ); } function footnote3 () { document.write ( "Centered
" ); } function footnote4 () { document.write ( " This is a"
+ "ll in a P tag
Right alignment from the ALIGNMENT attribute
color and font from the STYLE att"
+ "ribute
Left
" ); } function title1use2 () { document.write ( "Javascript Title 1" ); } function title1use3 () { document.write ( "Another Javascript Title 1" ); } function title1use4 () { document.write ( "A test of all titles" ); } function title2 () { document.write ( "Two" ); } function title3 () { document.write ( "Three" ); } function title4 () { document.write ( "Four" ); } function title5 () { document.write ( "Five" ); } function title6 () { document.write ( "6" ); } function title7 () { document.write ( "7" ); } function title8 () { document.write ( "8" ); } function title9 () { document.write ( "9" ); } function title10 () { document.write ( "10" ); } function footnote1 () { document.write ( "A test of all footnotes" ); } function footnote2use2 () { document.write ( "2" ); } function footnote3use2 () { document.write ( "3" ); } function footnote4use2 () { document.write ( "4" ); } function footnote5use2 () { document.write ( "5" ); } function footnote6 () { document.write ( "6" ); } function footnote7 () { document.write ( "7" ); } function footnote8 () { document.write ( "8" ); } function footnote9 () { document.write ( "9" ); } function footnote10 () { document.write ( "10" ); } function title1use5 () { document.write ( " This page was generated by S"
+ "AS program jsTitleAndFootnote-sample.sas
Richard A. DeVenezia
ht"
+ "tp://www.devenezia.com
This page was generated by S"
+ "AS program jsTitleAndFootnote-sample.sas
Richard A. DeVenezia
ht"
+ "tp://www.devenezia.com