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?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.