Hello there,
I have posted this on the programing forum and one of the person there have asked me to do a posting here as its the correct place to do so.
Could someone please share his/her knowledge on how to create a drop down menu on an html file using ods html and gplot. The skeleton stucture is below.
ods html file=
body=
content=
frame=
path=;
proc gplot;
plot A*B;
run;
proc gplot;
plot C*D;
run;
proc gplot;
plot E*F;
run;
ods html close;
This is how I created the graphs to the html file and its location. What I would like to know is "HOW" and "WHERE" will I type in the code for the drop down menu for the html file.
The graphs that I generate are from a dynamic macro and its like this
A---1
2
3
B---1
2
C---1
2
3
4
5
A , B , C are the levels that the graphs need to be generated for. and each level have different number of graphs to generate. The numbers 1,2,3 etc are the number of graphs generated. Its a dynamic one and have to find a way to do a "drop down menu" and select each number(1,2,3....) graph.
If my question is vague please do let me know so I can explain it in a better way. Hoping to see some suggestions.
Thank you,
Niran
Heree someone has walked through it. Note they're using HTML and JavaScript and SAS ... three different languages to accomplish this.
http://www.lexjansen.com/wuss/2013/53_Paper.pdf
She walks through the process with sample code.
Can you add a link to your previous post? So others can see what's already been suggested.
The link to the previous post is below:
Hi Cynthia,
Thank you for spending your time for my isssue. Yes the table of contents suggested by Reeza is a good idea, but its got too much of extra informations that is not needed. I have over written the sas generated contents to a custom one. I have attached an img with this post. Please do have a look at it. It may not be upto the expectation but did the best I could....
1. The img you see is one html file.
2. Has 3 columns: a) left most one is the custom made contents.
b) middle is what I need to make for drop down menu
c) right most one is the displayed graphs
3. The pic shows how each levels(A,B,C....) html file with graphs look like. Meaning each level will have its own html file with the graphs in it.
4. Each level will have some sub-levels(may be 1 or 2 or 4 or even 70)
5. Each sub-level will have a constant number of charts (usually 9 graphs each).
6. The problem that I face is that for a level with 70 sub-level, its hard to scroll down and see the graphs. So I need a drop down menu for the sub-levels. Meaning : Click on the drop down menu for the desired sub-level and the graphs for it will be displayed.
This is the concept that I would like to implement. But I have no idea how to create the drop down menue and link the sub-level from there to the sub-level of the graphs. Could you please help me with this Cynthia.
You basically need a wrapper of some sort on top of your HTML page. If this is something you need to continuously do, it may make sense to use a different tool, such as SAS visual analytics or web report services to deliver dynamic reports.
I can see the usefulnes of being able to implement such a feature, but I feel it's not really a SAS related issue at this point. You can implement it so many ways, and many different languages that you would have to choose one first. Also, not all features will be supported across all browsers, so something to think about.
Hi Reeza,
I have read some where that you can write all the html coding for the dropdown menu in a text file. Then create a sas "DATA SET" to read the html code. But I havent seen any example for it. According to you will this work ?. If so can you please give me some insight on it.
Thanks
Niran
Post the link that mentioned this?
To me that would only bring the HTML/code into SAS, how would you place it into the ODS output such that it recognized it?
I'm also assuming, based on how your phrased your question, that you'd have to generate this TOC each time because the number of graphs under each groups isn't know ahead of time.
Heree someone has walked through it. Note they're using HTML and JavaScript and SAS ... three different languages to accomplish this.
http://www.lexjansen.com/wuss/2013/53_Paper.pdf
She walks through the process with sample code.
Thanks Reeza for the pdf link. I could not find a link for what you have asked for. I did find a long way to solve this.What I did is that I created seperate html for each sub level. I was able to link the drop down menu sub-level item to the sub-level html file. Its good for a small number of sub-levels. But for like 70 sub-levels, its not feasible.
I am still working on how to link the drop down sub-level to the sub-level graphs in "one single"html file. By any chance if you or Cynthia come across the slightest idea of solving this , please to let me know. If this is possible just by using SAS and basic html coding
, then I guess its going to make sas users create reports easily and well presentable.
Thanks,
Niran
The code in the paper doesn't work? It seemed to be exactly what you wanted.
I apologize for the late reply. The code and the concept works. I had altered the concept and solved my problem. Thank you Reeza and Cinthia for the time.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: