<?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: Assign Macro variable value to HTML text box in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Assign-Macro-variable-value-to-HTML-text-box/m-p/200495#M37472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS does not evaluate macro triggers inside of single quotes.&amp;nbsp; Use double quotes instead.&amp;nbsp; Embedded double quotes need to be doubled up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;" document.getElementById(""mobile"").value=""&amp;amp;mobile"";"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;...&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2015 13:33:30 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2015-03-13T13:33:30Z</dc:date>
    <item>
      <title>Assign Macro variable value to HTML text box</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-Macro-variable-value-to-HTML-text-box/m-p/200494#M37471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to build a SAS report in HTML, where in have text boxes to get the data from the user and save it into a data set and then displayed the saved data from the dataset in another page.&lt;/P&gt;&lt;P&gt;for eg, if I am querying for a particular primary key field from the dataset, if that field exist, then should display all the row details into the corresponding textboxes wherein I have the option to edit.&lt;/P&gt;&lt;P&gt;I am able to get the form details into macro variables using JavaScript and below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;script&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt; put' var mobile = document.getElementById("mobile").value;';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt;"&gt;&amp;lt;\script&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;to get the value of mobile number entered in html page to the&amp;nbsp; global macro variable mobile.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;But I am unable to perform the reverse.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;assign the value of the macro variable into the html textbox element so that I can display the value on the frontend.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am using the following code but not working&lt;/SPAN&gt; yet&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;script&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 12pt;"&gt;put' document.getElementById("mobile").value="&amp;amp;mobile";';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt;"&gt;&amp;lt;/script&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;it displays&amp;nbsp; &lt;STRONG&gt;&amp;amp;mobile&lt;/STRONG&gt;&amp;nbsp; in the textbox field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;if I use without the double quotes, sas throws an error that the variable mobile is not defined.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Kindly provide a resolution at the earliest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Kindly &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 02:48:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-Macro-variable-value-to-HTML-text-box/m-p/200494#M37471</guid>
      <dc:creator>Anand6666</dc:creator>
      <dc:date>2015-03-13T02:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Assign Macro variable value to HTML text box</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-Macro-variable-value-to-HTML-text-box/m-p/200495#M37472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS does not evaluate macro triggers inside of single quotes.&amp;nbsp; Use double quotes instead.&amp;nbsp; Embedded double quotes need to be doubled up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;" document.getElementById(""mobile"").value=""&amp;amp;mobile"";"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;...&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 13:33:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-Macro-variable-value-to-HTML-text-box/m-p/200495#M37472</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-03-13T13:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Assign Macro variable value to HTML text box</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-Macro-variable-value-to-HTML-text-box/m-p/200496#M37473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Tom, the resolution worked, also I was able to achieve the same using cards4 format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Mar 2015 09:25:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-Macro-variable-value-to-HTML-text-box/m-p/200496#M37473</guid>
      <dc:creator>Anand6666</dc:creator>
      <dc:date>2015-03-22T09:25:10Z</dc:date>
    </item>
  </channel>
</rss>

