BookmarkSubscribeRSS Feed
Yennie
Calcite | Level 5
Hi

Just wondering if anyone knows how to use Eguide to create drop down menu and buttons on a html page?

Much Thanks
Yennie
8 REPLIES 8
Patrick
Opal | Level 21
I think you will have to code this, i.e:

data _null_;
file 'c:\test.htm';

put ''
/ ''
/ ''
/ ''
/ ''
;
run;

HTH
Patrick
Yennie
Calcite | Level 5
Hi Patrick,

thank you so much for the code. However that is a button and I am trying to work create a drop down menu whereby users can select different products.

Thanks so much for your help.

cheers
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Are you expecting the "list" to be dynamic based on a current SAS file's variable content or are you intending to supply a static list of choices to generate the SAS code? An important point to consider.

Scott Barry
SBBWorks, Inc.
Yennie
Calcite | Level 5
Hi Scott,

Yes I am expecting the "List" to be dynamic based on current SAS file's variable content.

Thank you for your response!
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Personally, I have no experience with EG, however, having searched the SAS support http://support.sas.com/ website, there is discussion in the SUGI/SGF conference paper below, related to "dynamic populated menus". References are made to differences with EG 4.1 and improved EG 4.2.

Scott Barry
SBBWorks, Inc.

SAS® Stored Processes: Going Beyond the Current Capabilities of the
Stored Process Wizard
Joe Flynn, SAS Institute Inc., Cary, NC
https://support.sas.com/resources/papers/proceedings09/330-2009.pdf
Patrick
Opal | Level 21
I just started to get up-to-date with SAS 9.2.

There seems to be a lot of improvements, also for dynamic and cascading prompts (Prompting Framework).

I still think that if you want to use SAS EG to generate HTML output you will have to code dynamic prompts manually (may be further studies will teach me otherwise - but I would be very surprised).

In case you have SAS Webreport Studio 4.2 at hand then this would give you heaps of options in regards of dynamic and cascading drop down lists.
Cynthia_sas
SAS Super FREQ
Hi, Scott:
You're absolutely on target. If we went down into the Stored Process world and the BI Platform, there would be no need to code your own drop down box or your own "menus". Stored Processes that have parameters use the EG or the WRS or the SAS Add-in capabilities to prompt the user with a drop-down box or a radio button or whatever is appropriate.

You can build choices based on variable values. And with SAS 9.2 and the Platform, you can implement stored processes with cascading and dynamic prompts. It is very cool stuff, indeed.

However, with no information about whether this was a simple client/server install or whether it was a Platform usage of EG or whether we were dealing with a local install of SAS with a local install of EG, there were almost too many possibilities for the answer. Even more possibilities if someone was developing programs in EG for the programs to be used with SAS/IntrNet.

cynthia
Cynthia_sas
SAS Super FREQ
Hi:
Generally drop down menus are part of an HTML form. The method that Patrick showed you for generating a button would be the same technique you'd use for generating a form. Conceptually, you'd need to develop the HTML form first before you coded it with SAS. You need to:

1) understand the HTML needed for an HTML form and a select box
2) understand what the form action should be
3) code the HTML form to contain a select box and test the form action when various selections are made.
for more information on HTML forms and select boxes, see:
http://www.w3schools.com/TAGS/tag_Select.asp
http://www.w3schools.com/TAGS/tag_form.asp
(Select box example from w3schools site)
[pre]
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
[/pre]

4) Once your "vanilla" HTML form is working, now you know how to code the DATA step program to generate the form with SAS. At this point, you could generate the select options from data set values (instead of hard-coding them for the test).
5) Now you have to deploy and implement your SAS program that generates the HTML form. How do you plan to invoke the SAS program? Where will the SAS program live? How do you intend for your users to receive the results from the use of the HTML form with the drop down box? What SAS products/configurations/installations are needed to make this form work??? If you have one SAS program that generates the form, what is the form action going to be that returns the results??? A second SAS program? Some other program?

Just a comment: this is the type of thing -- building an HTML form using SAS -- that is frequently done with the SAS/IntrNet product (and the Application Dispatcher or htmSQL) or with a Stored Process in the Information Delivery Portal.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 8 replies
  • 2394 views
  • 0 likes
  • 4 in conversation