Button to make Api call

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
Alphadek
 
 
Posts: 2
Joined: Thu Feb 01, 2018 9:40 am

Button to make Api call

Post by Alphadek »

Is it possible to maken a button by wysiwygwebbuilder to make a Api call to a site (HTTP Get).

Like

http://<ipadress>/<password>/sw/5/on

When i now make an button the action is done but the browser change to te respose page. I dont want that.
User avatar
Pablo
 
Posts: 21578
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Button to make Api call

Post by Pablo »

yes, you can add a link to a button.
Alphadek
 
 
Posts: 2
Joined: Thu Feb 01, 2018 9:40 am

Re: Button to make Api call

Post by Alphadek »

Hi Pablo,

Yes i know, butt when i press the button. The webpage wil follow the link en display de response of the API. I want to stay on the button page.
User avatar
Pablo
 
Posts: 21578
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Button to make Api call

Post by Pablo »

In that case you will have to implement a AJAX call.
For example:
http://api.jquery.com/jquery.ajax/

Note that this is unrelated to WWB.
Post Reply