<?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 Re: Saving a JavaScript Value to a SAS Global Variable in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Saving-a-JavaScript-Value-to-a-SAS-Global-Variable/m-p/193131#M4438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about using HttpRequestObject (Ajax) to interact with SAS and using Sessions to keep the Variable Value between interactions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See links bellow with the puzzle parts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings10/014-2010.pdf" title="https://support.sas.com/resources/papers/proceedings10/014-2010.pdf"&gt;https://support.sas.com/resources/papers/proceedings10/014-2010.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/sessions.html" title="http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/sessions.html"&gt;SAS Stored Processes: Sessions&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2015 16:05:37 GMT</pubDate>
    <dc:creator>BrunoSilva</dc:creator>
    <dc:date>2015-05-26T16:05:37Z</dc:date>
    <item>
      <title>Saving a JavaScript Value to a SAS Global Variable</title>
      <link>https://communities.sas.com/t5/Developers/Saving-a-JavaScript-Value-to-a-SAS-Global-Variable/m-p/193129#M4436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;I’ve been researching how to integrate SAS and JavaScript.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;Is there a way to set a SAS variable equal to JavaScript variable in SAS 9.2?&amp;nbsp; I have a stored process inside of Information Delivery Portal using a Web URL that displays a stored process inside a webpage like setup.&amp;nbsp; I found that SAS can use HTML variables when the user clicks refresh so long as the variables are Global Variables.&amp;nbsp; Changing the HTML variable changes the SAS variable. I want to access one of the Global variables via JavaScript so that I can reference the value when the page reloads. I only need the JavaScript to extract the value of: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; background: white;"&gt;$(""#degStudLev"").multipleSelect('getSelects');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;Is there a way extract this value as html or assign it to a Global SAS variable?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;The code concept is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;%Global degStudLev degStudLevComma;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; font-size: 14.6666669845581px; background-color: #ffffff; font-family: Arial, sans-serif;"&gt;/*degStudLev is assigned a value*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;%macro javaScriptFunctions;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_ ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file _webout ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put '&amp;lt;script type="text/JavaScript"&amp;gt;' ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put "function saveMultiSelection() {";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put "alert('Selected values: ' + $(""#degStudLev"").multipleSelect('getSelects'));";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 1.0in;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif; color: #3366ff; background: white;"&gt;/*this is the line doesn't save the variable back to SAS Global Variable degStudLevComma.*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif; color: #3366ff; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put "var degStudLevComma = $(""#degStudLev"").multipleSelect('getSelects');"; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put "}";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;%mend;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;%javaScriptFunctions;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 14:56:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Saving-a-JavaScript-Value-to-a-SAS-Global-Variable/m-p/193129#M4436</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2015-05-26T14:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Saving a JavaScript Value to a SAS Global Variable</title>
      <link>https://communities.sas.com/t5/Developers/Saving-a-JavaScript-Value-to-a-SAS-Global-Variable/m-p/193130#M4437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the multiple selection is a List Box when you submit the form it is converted to multiple macro variables in SAS.&lt;/P&gt;&lt;P&gt;If not a List Box, how about you save to a hidden text input, when your form is submited you get the value on SAS as a macro variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:53:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Saving-a-JavaScript-Value-to-a-SAS-Global-Variable/m-p/193130#M4437</guid>
      <dc:creator>BrunoSilva</dc:creator>
      <dc:date>2015-05-26T15:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Saving a JavaScript Value to a SAS Global Variable</title>
      <link>https://communities.sas.com/t5/Developers/Saving-a-JavaScript-Value-to-a-SAS-Global-Variable/m-p/193131#M4438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about using HttpRequestObject (Ajax) to interact with SAS and using Sessions to keep the Variable Value between interactions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See links bellow with the puzzle parts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings10/014-2010.pdf" title="https://support.sas.com/resources/papers/proceedings10/014-2010.pdf"&gt;https://support.sas.com/resources/papers/proceedings10/014-2010.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/sessions.html" title="http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/sessions.html"&gt;SAS Stored Processes: Sessions&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 16:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Saving-a-JavaScript-Value-to-a-SAS-Global-Variable/m-p/193131#M4438</guid>
      <dc:creator>BrunoSilva</dc:creator>
      <dc:date>2015-05-26T16:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Saving a JavaScript Value to a SAS Global Variable</title>
      <link>https://communities.sas.com/t5/Developers/Saving-a-JavaScript-Value-to-a-SAS-Global-Variable/m-p/193132#M4439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial',sans-serif; background: white;"&gt;The hidden textbox should work.&amp;nbsp; Currently doing a proof of concept.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 16:14:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Saving-a-JavaScript-Value-to-a-SAS-Global-Variable/m-p/193132#M4439</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2015-05-26T16:14:14Z</dc:date>
    </item>
  </channel>
</rss>

