BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AsSASsin
Quartz | Level 8

Hello!!

I’m trying to develop a web app that is opened in the Sas Visual Analytics viewer.

Basically my problem is this:

I have a form with a button that submit the action to call the stored process.

Everything works well but it is submitted in another page.

I need to stay on the same page and change the “innerHTML” value of a dom object to comunicate the status with the user.

How could I do that?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
boemskats
Lapis Lazuli | Level 10

I'd need to see your code, but I imagine you're doing HTML form submits rather than anything AJAXy. You need to use Javascript and an XMLHttpRequest to interact with a server without having to do a full page refresh. We maintain a library that facilitates this with SAS that may save you a lot of time.

 

Have a look at the following link on XMLHttpRequests: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest

 

And the following for H54S (the lib I mentioned): https://github.com/boemska/h54s

 

Nik

View solution in original post

3 REPLIES 3
boemskats
Lapis Lazuli | Level 10

I'd need to see your code, but I imagine you're doing HTML form submits rather than anything AJAXy. You need to use Javascript and an XMLHttpRequest to interact with a server without having to do a full page refresh. We maintain a library that facilitates this with SAS that may save you a lot of time.

 

Have a look at the following link on XMLHttpRequests: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest

 

And the following for H54S (the lib I mentioned): https://github.com/boemska/h54s

 

Nik

AsSASsin
Quartz | Level 8

Thank you very much.

Yes it is html form.

I looked the links, but I can’t find examples.

My application is very simple...just  modify a <p> text object in the page if a SAS script is gone well.

Have you any link with some examples to understand how it works?

AsSASsin
Quartz | Level 8
Today I tried to use the xmlhttprequest and in seems to work like a charm.
I haven’t used h54s but the xmlhrrequest works well with JavaScript and the standard w3school code just modified for my purposes.
Thank you for the help!

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1795 views
  • 1 like
  • 2 in conversation