BookmarkSubscribeRSS Feed
Ronny_Dsouza
Obsidian | Level 7

Hi All, 

 

As part of a web application development using SAS STP, we are tryign to integrate the same with JQgrid,  wherein we are referencing the following global forum paper "http://support.sas.com/resources/papers/proceedings16/6960-2016.pdf", 

 

For testing purpose we were trying to replicate the example mentioned in the paper,  however we are not able to see the output in the HTML page, tihough our stored process is running absolutely fine.

 

Can someone please look into the sample HTML and STP we have created and advise what are we doing wrong.

 

Thanks 

Ron

 

 

6 REPLIES 6
boemskats
Lapis Lazuli | Level 10

Ronny,

 

I've just tested your code and it works ok.

 

Are you familiar with how the debug consoles on Chrome / Firefox work? If the name of your SAS web tier host is indeed sasva.demo.sas.com, you need to make sure that the AJAX request is actually being made. You should be able to copy the jqGrid URL property into your browser and see your data.

 

Where are you hosting your .html file? You should try putting it in a subdirectory of Lev1/Web/WebServer/htdocs/ so it is behind the same reverse proxy.

 

Other simple things to look at - Streaming output needs to be enabled on your stp obviously. Again, check that the output was correct through the SPWA, easily done by copying and pasting the URL into a new tab.

 

Make sure you have a look at the console and network tabs of your browser's debug console. What browser are you using? 

 

Nik

Ronny_Dsouza
Obsidian | Level 7

Hey Nik,

 

Yes, 

- the html file is stored in the HTDOCS folder

- The STP URL works one, and shows the JSON output.

- All access individual jqgrid to test its accessibility.

- testing it using both IE ver 11 and Chrome ver 51.x

 

Can you please share the screenshot, 

 

Regards

Ron

Ronny_Dsouza
Obsidian | Level 7
Hi,
I just tried my luck of calling the same via a URL Display portlet and the same got executed,

however we need to surface this html as an independent web page, so any pointers why the call is not happening when its an independent web page is something we would like to debug.

Thank
Ron
Ronny_Dsouza
Obsidian | Level 7

Hi Nik, 

 

Unfortunately, we are working in  controlled environment and hence cannot have any webex, 

 

Thanks

Ron

VasilijNevlev
Quartz | Level 8
Hey Ronny,
As Nik mentioned, what did you get in Chrome Dev Tools? You can open it by pressing F12. You will need to refresh the page after you have opened the tool, so it could capture what is going on.
Regards,
Vasilij
=======================================
For more information about {An}alytium, visit https://www.analytium.co.uk
boemskats
Lapis Lazuli | Level 10

Ron,

 

Here's a list of things to consider in that case:

 

- You should change this line:

 

url:
'http://sasva.demo.sas.com/SASStoredProcess/do?_program=%2FShared+Data%2FCustomSTP%2FTestGrid',

to this:

url:
'/SASStoredProcess/do?_program=%2FShared+Data%2FCustomSTP%2FTestGrid',

You should not need to specify the full hostname and the protocol if you are loading your .html file correctly. This will make your code more portable and ensures you're not having problems with same origin policy or a mismatch when switching between http/https.

 

I expect your DataGrid.txt file you attached is called DataGrid.html in your system, and when stored inside your htdocs directory, you should be loading it with a URL like

http://sasva.demo.sas.com/[whateversubdirectoryinyourhtdocs]/DataGrid.html

 

With that out of the way, the main thing I can think of is that your browser session inside your controlled environment is not able to access the external internet, therefore unable to source the JavaScript files from the CDNs. This should show up on the Network tab of Chrome DevTools as red, failed requests and should be obvious. If that's the case, you should copy down the .js and .css files sourced at the top of your html page into the same directory as your DataGrid.html, and change your <head> to something like this:

 

<head>
 <!-- The jQuery library is a prerequisite for all jqSuite products -->
 <script type="text/ecmascript" src="jquery-2.1.1.min.js"></script>
 <!-- This is the JavaScript file of jqGrid -->
 <script type="text/ecmascript" src="jquery.jqGrid.min.js"></script>
 <!-- This is the localization file of the grid controlling messages, labels, etc. -->
 <!-- We support more than 40 localizations -->
 <script type="text/ecmascript" src="grid.locale-en.js"></script>
 <!-- A link to a jQuery UI ThemeRoller theme, more than 22 built-in and many more custom -->
 <link rel="stylesheet" type="text/css" media="screen" href="jquery-ui.css" />
 <!-- The link to the CSS that the grid needs -->
 <link rel="stylesheet" type="text/css" media="screen" href="ui.jqgrid.css" />

 

As Vasilij suggests, you should spend some time getting comfortable with the DevTools console and the Network tab - all of these problems should be pretty obvious from there.

 

Nik

 

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!

How to Concatenate Values

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.

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
  • 6 replies
  • 1753 views
  • 1 like
  • 3 in conversation