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.
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
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
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?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.