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?
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.