Run it on the stored process server and be sure to leave the %STPBEGIN/%STPEND macros turned off.
~ Angela Hall
Thanks! Will check on your blog. I might get some more creative stuffs out there.
I'm currently implementing and testing stp + jquery right now. I have 6 portlets, the values of the different fields on the 1st portlet controls all the results of the other 5 portlets. The submit button on the 1st portlet calls an ajax request which prepares the data for the other portlets before the content portion of the current page gets refreshed.
So far I'm getting what I am expecting. It's cool that sas could work in combination of html. Coding is just a little messy because of the put statements. :smileylaugh:
Ah the put statements. I would actually recommend moving toward the cards4; input data lines capability.
Here is a great example - this avoids the quoting around java/js/etc and put statements.
Hi there, i started with something basic. I was trying to get an autocomplete textbox but it does not work.
This is my code, when running the html as test.html it works...
format infile $char1000.;
infile = resolve(_infile_);
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css" type="text/css" />
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.css" type="text/css" />
var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
<title> Test </title
API Reference: <input id="example" /> (try "C" or "E")
I actually tried your code above and got the same result.
So instead of referencing the js file on their site like this...
Try downloading the js and css files and put it somewhere your server so you can access it like this...
or even create a different war file to place your jquery files
Hope this helps.
Sorry for the late reply.
If you are using Tomcat here's an example of steps you can do:
1. on your tomcat webapps directory (ex. C:\<tomcat version>\webapps), copy SASTheme_default(since it's the simplest out there) and rename it whichever name you like (ex. SASCustom)
2. Delete the contents of SASCustom except for the META-INF and WEB-INF folders.
3. Add new folders on SASCustom (ex. scripts, styles).
4. Add files that you'll want to be accessed by your stored procs (ex. put your jquery scripts inside SASCustom\scripts-)
5. Restart Tomcat
6. Open a browser and try to check if you can access http://<servername>:8080/SASCustom/scripts/jquery.js. If it prompts you to open or download the file, then you've correctly done the steps above.
7. Try your jquery explorations. Actually I only used jquery to simplify access(instead of using getelementbyid most of the time because it's so looooong) and for the ajax function(i'm not confident using ajax if I'll be coding the function myself haha!). What you're trying to actually explore like your testing above is more advanced. Enjoy!
However, if you're using Weblogic or WebSphere, there are a few more steps and I'm not much familiar about it but it's still similar to the example I gave above.
Hope this helps.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.