Bootstrap CSS tabs


John Clarke

If I implement tabs using bootstrap 4 (https://www.w3schools.com/bootstrap/bootstrap_tabs_pills.asp) how can I get my code to load the content in the contents section from a URL?


decsoft

Hello John,

Are you referring to the previous or the current generation of DecSoft App Builder?



John Clarke

The current generation of DecSoft App Builder.


decsoft

Hello John,

In fact in both AB1 or AB2 the possible solution (one of them, since probably there is not only one way to do it) is very similar. The difference is that in the previous generation of AB we use Bootstrap CSS 4.x, and, in the current generation of AB we use the very latest release of the Bootstrap CSS framework.

By the way, the right documentation of the Bootstrap CSS framework is the official website. For example, talking about "Navs and tabs", talking about AB2, we can refer to this website.

What I do is to take some piece of HTML markup from the above linked Bootstrap CSS documentation in order to show some "pill tabs" inside an HTML control of DecSoft App Builder. This is the piece of HTML markup that I use for this sample:

You can copy the above HTML code and paste it directly in one app's view: when you do so AB automatically creates an HTML control for you and places it inside the proper HTML markup ready to be used.

Now, suppose that what we wanted is to show the content of the "Contact" tab from an external URL, so, we can place the below Javascript code in the app's view Show event, the same app's view who contains the above HTML control:

And that's all basically. Maybe you want to make a "get" jQuery call instead of a "load" one, or maybe you wanted another possible HTML markup, but, the idea will be very similar: we need an HTTP call in order to get our desired content, and then place that content (the response of the HTTP call) in our tab content DIV container.



John Clarke

Thanks for that. It's just what I needed.


decsoft

Hello John,

Thanks for that. It's just what I needed.

You're welcome!


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.