BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Obsidian | Level 7

I am creating a stored process where I'm attempting (but failing) to import twitter bootstrap to have access to some easy custom css styling options.


At the top of the stored process code below, it imports bootstrap, jquery, and a jquery library for bootstrap. It is nearly identical to the example shown here except with a small paragraph that will show an alert message when clicked (which was another example).


What is interesting is that the jQuery part works (the alery message is activated) but the bootstrap styling is missing and apparently not working. Maybe SAS is overwriting the style? Can someone tell me how to incorporate bootstrap into my stored process?


data _null;

 file _webout;
 put '<!DOCTYPE html>
		<link rel="stylesheet" href="">
  		<script src=""></script>
  		<script src=""></script>
		        alert("The paragraph was clicked.");

		<p>Click on this paragraph.</p>

		<div class="container-fluid">
		  <h1>My First Bootstrap Page</h1>
		  <p>This is some text.</p> 

Accepted Solutions
Obsidian | Level 7
Found the answer inspecting the source. Need https not http...

View solution in original post

Obsidian | Level 7
Found the answer inspecting the source. Need https not http...
Lapis Lazuli | Level 10



If you link to it in the script tag as //, so without https:// or http://, your browser will pick out the protocol automatically. This will make it a portable solution if you're migrating your code between environments that may or may not use https.


If you're going to that level of complexity with your web development, consider hosting your static html/js/css files on your web server (if you can), and using something like our HTML5 Data Adapter for SAS library to talk to the STP webapp. It'll make your code a lot easier to work with as your frontends grow in complexity. 



Obsidian | Level 7

You need som extra, in case you have old IE-browsers running



%macro readCards4();
	format infile $char256.;
	infile = resolve(_infile_);
	file _webout encoding='utf-8';
	put infile;
%mend readCards4;

data _null_;
<!DOCTYPE html>
<html lang="en">
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<title>Bootstrap v3 DEMO</title>

	<!-- Bootstrap specific -->
	<!-- Latest compiled and minified CSS -->
	<link rel="stylesheet" href="" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

	<!-- Optional theme -->
	<link rel="stylesheet" href="" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src=""></script>

	<!-- Latest compiled and minified JavaScript -->
	<script src="" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

<body role="document">
[...stuff happens here...]





Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 3 in conversation