Your SAS programs, embedded in web apps and elsewhere

REPLAY javascript/stylesheets files

Reply
Contributor
Posts: 57

REPLAY javascript/stylesheets files

You can use the REPLAY stored process to replay entries other than embedded images, such as CSS stylesheets, JavaScript... from http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/embedgrf.html

Could anyone tell me how to actually code REPLAY in stored process program for including .css/.js files in the output html stream? Where should I place .css/.js files in the Stored Process Server?
Contributor
Posts: 66

Re: REPLAY javascript/stylesheets files

Do you actually need to? Generally you can store .css and .js files in the head using ods headtext (I think there is a stylesheet option for 9.2 as well). Alternatively, store it in a template via proc template. From what I can see in the documentation, using _replay creates multiple calls to the stored process server within a stored process (correct me if I am wrong). The browser is very good at caching stylesheets and javascripts in an optimal way (especially chrome and firefox). I think using template or headtext would result in more efficient browser processing.

If you do want to use it, it looks like you would have to parse the css or js file via a sas stored process and include the full stored process url in your head section of the stored process output anyway.
Contributor
Posts: 57

Re: REPLAY javascript/stylesheets files

Could you give me an example code? Hard to understand what you said in plain words.
Ask a Question
Discussion stats
  • 2 replies
  • 245 views
  • 0 likes
  • 2 in conversation