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!

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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