<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SAS doesn't read Javascript code in Developers</title>
    <link>https://communities.sas.com/t5/Developers/SAS-doesn-t-read-Javascript-code/m-p/632870#M6012</link>
    <description>&lt;P&gt;Hi, I am a new SAS user. I was tasked to create a form to allow users to either submit their queries through text or filter data variables. The expected result will be for the form to display the 2 radio buttons first before either a text field comes out if the "Text" radio button is chosen, or a dropdown list comes out if the "Table" radio button is chosen. However, everything came out at once since the Javascript functions are not being displayed. This was not the case when I did the code for the form on Visual Studio as everything is being displayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My SAS code is as shown below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	create table table_list as select * from dictionary.tables where 
		LIBNAME='PUBLIC';
quit;

data _null_;
	set table_list end=alldone;
	file _webout;

	if _n_=1 then
		do;
			thissrv="&amp;amp;_URL";
			thispgm="&amp;amp;_program";
			put '&amp;lt;html&amp;gt;';
			put '&amp;lt;head&amp;gt;';
			put '&amp;lt;meta name="viewport" content="width=device-width,initial-scale=1.0"&amp;gt;';
			put '&amp;lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"&amp;gt;';
			put '&amp;lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt;';
			put '&amp;lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"&amp;gt;&amp;lt;/script&amp;gt;';
			put '&amp;lt;/head&amp;gt;';
			put '&amp;lt;body onload="inputQuery()"&amp;gt;';
			put '&amp;lt;h3&amp;gt;Query and Suppress Data&amp;lt;/h3&amp;gt;';
			put '&amp;lt;FORM id="f1" ACTION="' thissrv +(-1) '" method=get  target="frame2"&amp;gt;';
			put '&amp;lt;input type="hidden" name="_program" value="' thispgm +(-1) '"&amp;gt;';
			put '&amp;lt;input type="hidden" name=reqtype value="create_input"&amp;gt;';
			put '&amp;lt;input type="hidden" name=_ODSDEST value="html"&amp;gt;';
			put '&amp;lt;div class="form-group row justify-content-center"&amp;gt;';
			put '&amp;lt;div class="col-sm-6"&amp;gt;';
			put '&amp;lt;div class="form-check form-check-inline"&amp;gt;';
			put '&amp;lt;input type="radio" class="form-check-input" id="text" name="query" value="Text" onclick="showInput()" /&amp;gt;';
			put '&amp;lt;label class="form-check-label" for="text"&amp;gt;Text&amp;lt;/label&amp;gt;';
			put '&amp;lt;/div&amp;gt;';
			put '&amp;lt;div class="form-check form-check-inline"&amp;gt;';
			put '&amp;lt;input type="radio" class="form-check-input" id="table" name="query" value="Table" onclick="showInput()" /&amp;gt;';
			put '&amp;lt;label class="form-check-label" for="text"&amp;gt;Table&amp;lt;/label&amp;gt;';
			put '&amp;lt;/div&amp;gt;';
			put '&amp;lt;/div&amp;gt;';
			put '&amp;lt;/div&amp;gt;';
			put '&amp;lt;script&amp;gt;
            			function inputQuery() {
                			document.getElementById("query_text").style.display = "none";
                			document.getElementById("subtext").style.display = "none";
                			document.getElementById("query_table").style.display = "none";
                			document.getElementById("subtable").style.display = "none";
                			document.getElementById("submit").style.display = "none";
                			document.getElementById("reset").style.display = "none";
                			document.getElementById("refresh").style.display = "none";
            			}

            			function showInput() {
                			var result = document.querySelector("input[name="query"]:checked").value;
                			if (result == "Text") {
                    				document.getElementById("query_text").style.display = "block";
                    				document.getElementById("subtext").style.display = "block";
                    				document.getElementById("query_table").style.display = "none";
                    				document.getElementById("subtable").style.display = "none";
                    				document.getElementById("submit").style.display = "block";
                    				document.getElementById("reset").style.display = "block";
                    				document.getElementById("refresh").style.display = "none";
                			}
                			else if (result == "Table") {
                    				document.getElementById("query_text").style.display = "none";
                    				document.getElementById("subtext").style.display = "none";
                    				document.getElementById("query_table").style.display = "block";
                    				document.getElementById("subtable").style.display = "block";
                  				document.getElementById("submit").style.display = "none";
                    				document.getElementById("reset").style.display = "none";
                    				document.getElementById("refresh").style.display = "block";
                			}
            			}
        			&amp;lt;/script&amp;gt;';
				put '&amp;lt;div class="form-group row justify-content-center"&amp;gt;';
				put '&amp;lt;label class="control-label col-sm-2" id="subtext"&amp;gt;Submit Query:&amp;lt;/label&amp;gt;';
				put '&amp;lt;div class="col-sm-6"&amp;gt;';
				
				put '&amp;lt;textarea name="query_text" id="query_text" value="" cols="30" rows="5" placeholder="Enter Query" class="form-control"&amp;gt;&amp;lt;/textarea&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;div class="form-group row justify-content-center b4-form-inline"&amp;gt;';
				put '&amp;lt;div class="text-left"&amp;gt;';
				put '&amp;lt;button id="submit" formaction="' thissrv +(-1) 
					'" formtarget="frame3" type="submit"&amp;gt;Submit Query&amp;lt;/button&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;div class="text-right"&amp;gt;';
				put '&amp;lt;input id="reset" type="reset" value="Reset"&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put'&amp;lt;br&amp;gt;';

				put '&amp;lt;FORM id="f2" ACTION="' thissrv +(-1) '" method=get  target="frame2"&amp;gt;';
				put '&amp;lt;input type="hidden" name="_program" value="' thispgm +(-1) '"&amp;gt;';
				put '&amp;lt;input type="hidden" name=reqtype value="create_input"&amp;gt;';

				put '&amp;lt;div class="form-group row justify-content-center"&amp;gt;';
				put '&amp;lt;label class="control-label col-sm-2" id="subtable"&amp;gt;Select a Table:&amp;lt;/label&amp;gt;';
				put '&amp;lt;br&amp;gt;';
				put '&amp;lt;div class="col-sm-4"&amp;gt;';
				put '&amp;lt;select class="form-control" id="query_table"&amp;gt;';
				put '&amp;lt;OPTION VALUE="" selected&amp;gt;&amp;lt;/option&amp;gt;';
				put '&amp;lt;OPTION VALUE="SUPPRESSED_DATA"&amp;gt;SUPPRESSED_DATA&amp;lt;/option&amp;gt;';
				put '&amp;lt;OPTION VALUE="PREPARATION_DATA"&amp;gt;PREPARATION_DATA&amp;lt;/option&amp;gt;';
			end;
		if alldone then
			do;
				put '&amp;lt;/select&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;div class="form-group row justify-content-center"&amp;gt;';
				put '&amp;lt;div class="col-sm-4"&amp;gt;';
				put '&amp;lt;input id="refresh" type="submit" value="Refresh Variable List"&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put'&amp;lt;br&amp;gt;';
				put '&amp;lt;/form&amp;gt;';
				put '&amp;lt;/body&amp;gt;';
				put '&amp;lt;/html&amp;gt;';
			end;
	run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output screen if running from SAS:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Actual output (1).png" style="width: 188px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36953i14AEC163F117BA1F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Actual output (1).png" alt="Actual output (1).png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Actual output (2).png" style="width: 192px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36954i584825DBA219E90B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Actual output (2).png" alt="Actual output (2).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If my Javascript codes are being run, it should look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expected output (1).png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36955i33A3E4BF81B3DE2E/image-size/small?v=v2&amp;amp;px=200" role="button" title="Expected output (1).png" alt="Expected output (1).png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expected output (2).png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36956i4AC0FE71C7A436B0/image-size/small?v=v2&amp;amp;px=200" role="button" title="Expected output (2).png" alt="Expected output (2).png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expected output (3).png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36957i2A9A1E2C208BAEBC/image-size/small?v=v2&amp;amp;px=200" role="button" title="Expected output (3).png" alt="Expected output (3).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is it better if I use SAS programming language to solve this problem? Or if there is any other way to import my Javascript code? I cannot link this to a new embedded form because my full SAS code requires 2 HTML codes to run properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone tell me a way to solve this? Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Mar 2020 06:35:04 GMT</pubDate>
    <dc:creator>Ezer_Tien</dc:creator>
    <dc:date>2020-03-18T06:35:04Z</dc:date>
    <item>
      <title>SAS doesn't read Javascript code</title>
      <link>https://communities.sas.com/t5/Developers/SAS-doesn-t-read-Javascript-code/m-p/632870#M6012</link>
      <description>&lt;P&gt;Hi, I am a new SAS user. I was tasked to create a form to allow users to either submit their queries through text or filter data variables. The expected result will be for the form to display the 2 radio buttons first before either a text field comes out if the "Text" radio button is chosen, or a dropdown list comes out if the "Table" radio button is chosen. However, everything came out at once since the Javascript functions are not being displayed. This was not the case when I did the code for the form on Visual Studio as everything is being displayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My SAS code is as shown below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	create table table_list as select * from dictionary.tables where 
		LIBNAME='PUBLIC';
quit;

data _null_;
	set table_list end=alldone;
	file _webout;

	if _n_=1 then
		do;
			thissrv="&amp;amp;_URL";
			thispgm="&amp;amp;_program";
			put '&amp;lt;html&amp;gt;';
			put '&amp;lt;head&amp;gt;';
			put '&amp;lt;meta name="viewport" content="width=device-width,initial-scale=1.0"&amp;gt;';
			put '&amp;lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"&amp;gt;';
			put '&amp;lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt;';
			put '&amp;lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"&amp;gt;&amp;lt;/script&amp;gt;';
			put '&amp;lt;/head&amp;gt;';
			put '&amp;lt;body onload="inputQuery()"&amp;gt;';
			put '&amp;lt;h3&amp;gt;Query and Suppress Data&amp;lt;/h3&amp;gt;';
			put '&amp;lt;FORM id="f1" ACTION="' thissrv +(-1) '" method=get  target="frame2"&amp;gt;';
			put '&amp;lt;input type="hidden" name="_program" value="' thispgm +(-1) '"&amp;gt;';
			put '&amp;lt;input type="hidden" name=reqtype value="create_input"&amp;gt;';
			put '&amp;lt;input type="hidden" name=_ODSDEST value="html"&amp;gt;';
			put '&amp;lt;div class="form-group row justify-content-center"&amp;gt;';
			put '&amp;lt;div class="col-sm-6"&amp;gt;';
			put '&amp;lt;div class="form-check form-check-inline"&amp;gt;';
			put '&amp;lt;input type="radio" class="form-check-input" id="text" name="query" value="Text" onclick="showInput()" /&amp;gt;';
			put '&amp;lt;label class="form-check-label" for="text"&amp;gt;Text&amp;lt;/label&amp;gt;';
			put '&amp;lt;/div&amp;gt;';
			put '&amp;lt;div class="form-check form-check-inline"&amp;gt;';
			put '&amp;lt;input type="radio" class="form-check-input" id="table" name="query" value="Table" onclick="showInput()" /&amp;gt;';
			put '&amp;lt;label class="form-check-label" for="text"&amp;gt;Table&amp;lt;/label&amp;gt;';
			put '&amp;lt;/div&amp;gt;';
			put '&amp;lt;/div&amp;gt;';
			put '&amp;lt;/div&amp;gt;';
			put '&amp;lt;script&amp;gt;
            			function inputQuery() {
                			document.getElementById("query_text").style.display = "none";
                			document.getElementById("subtext").style.display = "none";
                			document.getElementById("query_table").style.display = "none";
                			document.getElementById("subtable").style.display = "none";
                			document.getElementById("submit").style.display = "none";
                			document.getElementById("reset").style.display = "none";
                			document.getElementById("refresh").style.display = "none";
            			}

            			function showInput() {
                			var result = document.querySelector("input[name="query"]:checked").value;
                			if (result == "Text") {
                    				document.getElementById("query_text").style.display = "block";
                    				document.getElementById("subtext").style.display = "block";
                    				document.getElementById("query_table").style.display = "none";
                    				document.getElementById("subtable").style.display = "none";
                    				document.getElementById("submit").style.display = "block";
                    				document.getElementById("reset").style.display = "block";
                    				document.getElementById("refresh").style.display = "none";
                			}
                			else if (result == "Table") {
                    				document.getElementById("query_text").style.display = "none";
                    				document.getElementById("subtext").style.display = "none";
                    				document.getElementById("query_table").style.display = "block";
                    				document.getElementById("subtable").style.display = "block";
                  				document.getElementById("submit").style.display = "none";
                    				document.getElementById("reset").style.display = "none";
                    				document.getElementById("refresh").style.display = "block";
                			}
            			}
        			&amp;lt;/script&amp;gt;';
				put '&amp;lt;div class="form-group row justify-content-center"&amp;gt;';
				put '&amp;lt;label class="control-label col-sm-2" id="subtext"&amp;gt;Submit Query:&amp;lt;/label&amp;gt;';
				put '&amp;lt;div class="col-sm-6"&amp;gt;';
				
				put '&amp;lt;textarea name="query_text" id="query_text" value="" cols="30" rows="5" placeholder="Enter Query" class="form-control"&amp;gt;&amp;lt;/textarea&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;div class="form-group row justify-content-center b4-form-inline"&amp;gt;';
				put '&amp;lt;div class="text-left"&amp;gt;';
				put '&amp;lt;button id="submit" formaction="' thissrv +(-1) 
					'" formtarget="frame3" type="submit"&amp;gt;Submit Query&amp;lt;/button&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;div class="text-right"&amp;gt;';
				put '&amp;lt;input id="reset" type="reset" value="Reset"&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put'&amp;lt;br&amp;gt;';

				put '&amp;lt;FORM id="f2" ACTION="' thissrv +(-1) '" method=get  target="frame2"&amp;gt;';
				put '&amp;lt;input type="hidden" name="_program" value="' thispgm +(-1) '"&amp;gt;';
				put '&amp;lt;input type="hidden" name=reqtype value="create_input"&amp;gt;';

				put '&amp;lt;div class="form-group row justify-content-center"&amp;gt;';
				put '&amp;lt;label class="control-label col-sm-2" id="subtable"&amp;gt;Select a Table:&amp;lt;/label&amp;gt;';
				put '&amp;lt;br&amp;gt;';
				put '&amp;lt;div class="col-sm-4"&amp;gt;';
				put '&amp;lt;select class="form-control" id="query_table"&amp;gt;';
				put '&amp;lt;OPTION VALUE="" selected&amp;gt;&amp;lt;/option&amp;gt;';
				put '&amp;lt;OPTION VALUE="SUPPRESSED_DATA"&amp;gt;SUPPRESSED_DATA&amp;lt;/option&amp;gt;';
				put '&amp;lt;OPTION VALUE="PREPARATION_DATA"&amp;gt;PREPARATION_DATA&amp;lt;/option&amp;gt;';
			end;
		if alldone then
			do;
				put '&amp;lt;/select&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;div class="form-group row justify-content-center"&amp;gt;';
				put '&amp;lt;div class="col-sm-4"&amp;gt;';
				put '&amp;lt;input id="refresh" type="submit" value="Refresh Variable List"&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;/div&amp;gt;';
				put'&amp;lt;br&amp;gt;';
				put '&amp;lt;/form&amp;gt;';
				put '&amp;lt;/body&amp;gt;';
				put '&amp;lt;/html&amp;gt;';
			end;
	run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output screen if running from SAS:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Actual output (1).png" style="width: 188px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36953i14AEC163F117BA1F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Actual output (1).png" alt="Actual output (1).png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Actual output (2).png" style="width: 192px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36954i584825DBA219E90B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Actual output (2).png" alt="Actual output (2).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If my Javascript codes are being run, it should look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expected output (1).png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36955i33A3E4BF81B3DE2E/image-size/small?v=v2&amp;amp;px=200" role="button" title="Expected output (1).png" alt="Expected output (1).png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expected output (2).png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36956i4AC0FE71C7A436B0/image-size/small?v=v2&amp;amp;px=200" role="button" title="Expected output (2).png" alt="Expected output (2).png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expected output (3).png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36957i2A9A1E2C208BAEBC/image-size/small?v=v2&amp;amp;px=200" role="button" title="Expected output (3).png" alt="Expected output (3).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is it better if I use SAS programming language to solve this problem? Or if there is any other way to import my Javascript code? I cannot link this to a new embedded form because my full SAS code requires 2 HTML codes to run properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone tell me a way to solve this? Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 06:35:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-doesn-t-read-Javascript-code/m-p/632870#M6012</guid>
      <dc:creator>Ezer_Tien</dc:creator>
      <dc:date>2020-03-18T06:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't read Javascript code</title>
      <link>https://communities.sas.com/t5/Developers/SAS-doesn-t-read-Javascript-code/m-p/632876#M6013</link>
      <description>&lt;P&gt;Welcome to the world of building web apps on SAS - probably the best way to use SAS (imho)!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I reproduced your code as a stored process using the &lt;A href="https://github.com/macropeople/macrocore" target="_self"&gt;MacroCore&lt;/A&gt; library here:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/allanbowe/4e2bb87250450381389e74f8e45a3a02.js&amp;quot;&amp;gt;&amp;lt;/script" target="_blank" rel="noopener"&gt;https://gist.github.com/allanbowe/4e2bb87250450381389e74f8e45a3a02.js&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I then opened Developer tools (F11) and saw the following errors:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-03-18 at 08.18.17.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36958iFAECB73026DC5D60/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-03-18 at 08.18.17.png" alt="Screenshot 2020-03-18 at 08.18.17.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;After a trying a few things, I&amp;nbsp;realised you were hit with probably one of the hardest-to-detect errors in SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The line length limit!&amp;nbsp; &amp;nbsp;Your program editor has a limit to the number of characters in a line of code.&amp;nbsp; Anything longer than approx 1000, and your code is just truncated, without a message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I split your code into several put statements and it worked:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-03-18 at 08.46.54.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36959i02DC838784D0744D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-03-18 at 08.46.54.png" alt="Screenshot 2020-03-18 at 08.46.54.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final code is here:&amp;nbsp;&amp;nbsp;&lt;A href="https://gist.github.com/allanbowe/1dbb3cc64e430d2f385bb26d27773019" target="_blank" rel="noopener"&gt;https://gist.github.com/allanbowe/1dbb3cc64e430d2f385bb26d27773019&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the future, you will find it much easier to build web apps on SAS using the Web Server.&amp;nbsp; Simply put your html / css/ js files in the static content folder, and call SAS using an adapter (such as SASjs).&amp;nbsp; An example (minimal) seed app for doing this is provided here:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/macropeople/minimal-seed-app" target="_blank" rel="noopener"&gt;https://github.com/macropeople/minimal-seed-app&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A full React example is here:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/macropeople/react-seed-app" target="_blank" rel="noopener"&gt;https://github.com/macropeople/react-seed-app&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here's a video of putting it together in 5 mins:&amp;nbsp;&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=vSNBea_M8yU" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=vSNBea_M8yU&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An end to end guide for building web apps on SAS is available here:&amp;nbsp;&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=vSNBea_M8yU" target="_blank" rel="noopener"&gt;https://sasjs.io&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, in case you are saying - "I don't have access to the SAS Web Server and my admin will never leave his cave to even respond to that request" - there is another solution, that doesn't involve hours of copy pasting put statements and apostrophes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is - &lt;A href="https://github.com/macropeople/sasjs-cli" target="_self"&gt;sasjs-cli&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a client tool that handles the compilation of SAS (backend) data services, and also FRONTEND files such as HTML / CSS / Javascript.&amp;nbsp; It will wrap your frontend files in put statements, and automatically 'split' them to prevent lines over 120 characters.&amp;nbsp; You can work locally in your favourite editor, with all your SAS / frontend files tidily arranged in your GIT repo, and simply build / deploy when ready.&amp;nbsp; The pre-requisite - NodeJS (version 12+).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The workflow:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;# install the tool globally (one time)

npm install -g sasjs-cli

# create a new project

sasjs create myapp

cd myapp

# all your SAS files are under sas/services/(subfolder)
# your frontend goes in a folder in the root
# update sas/config.json to set streamweb:true and websourcepath:yourwebfolder

sasjs build

&lt;/PRE&gt;
&lt;P&gt;that's it - you now have a deploy script under the `sasbuild` folder that will stream your frontend, and connect it to your backend services.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Enjoy.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 07:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-doesn-t-read-Javascript-code/m-p/632876#M6013</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2020-03-18T07:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't read Javascript code</title>
      <link>https://communities.sas.com/t5/Developers/SAS-doesn-t-read-Javascript-code/m-p/632888#M6014</link>
      <description>&lt;P&gt;Hi Allan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your code is still not working on my server. I still got the same output as the first output that I pasted.&lt;/P&gt;&lt;P&gt;I compared the final code with my code, but I didn't see any new put statements.&lt;/P&gt;&lt;P&gt;The output that you pasted isn't my expected output. There should only be radio buttons on the webpage if neither radio button has been selected, as seen in the output that is produced from my Visual Studio code (the second one).&lt;/P&gt;&lt;P&gt;Thanks for your help and advice. I will try this on my existing project and see how it goes.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 09:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-doesn-t-read-Javascript-code/m-p/632888#M6014</guid>
      <dc:creator>Ezer_Tien</dc:creator>
      <dc:date>2020-03-18T09:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't read Javascript code</title>
      <link>https://communities.sas.com/t5/Developers/SAS-doesn-t-read-Javascript-code/m-p/632899#M6015</link>
      <description>&lt;P&gt;Hi - I had to rush to a meeting and hadn't updated the gist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here you go:&amp;nbsp;&amp;nbsp;&lt;A href="https://gist.github.com/allanbowe/1dbb3cc64e430d2f385bb26d27773019" target="_blank"&gt;https://gist.github.com/allanbowe/1dbb3cc64e430d2f385bb26d27773019&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There was another issue with apostrophes here:&amp;nbsp; `&lt;SPAN style="font-family: inherit;"&gt;querySelector&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;"input[name="&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;query&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;"]:checked"&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;).&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;value&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;;`&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;This is also fixed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-03-18 at 10.50.44.png" style="width: 934px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36966iBF9F49CF98D5260F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-03-18 at 10.50.44.png" alt="Screenshot 2020-03-18 at 10.50.44.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;These things are MUCH easier to spot in a web IDE.&amp;nbsp; If you send me a PM, I'd be happy to jump on a video call and give you a 20 minute 'quick start' into building web apps on SAS.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;/Allan&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 09:51:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-doesn-t-read-Javascript-code/m-p/632899#M6015</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2020-03-18T09:51:42Z</dc:date>
    </item>
  </channel>
</rss>

