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 » Thu Feb 01, 2018 9:57 am

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: 13926
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Button to make Api call

Post by Pablo » Thu Feb 01, 2018 10:20 am

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 » Thu Feb 01, 2018 10:34 am

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: 13926
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Button to make Api call

Post by Pablo » Thu Feb 01, 2018 10:39 am

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

Who is online

Users browsing this forum: No registered users and 3 guests