Developers

Build Modal

Build modal window

Create a modal window with a build template inside. See available build templates here.

Note

The modal window is closed at the beginning. Use the function open to open it.

Usage

How to create this component:

sdk.buildModal(templateName:String, options:Object, headerText:String);

Target

This is the HTML component. For example the "#inbenta" target is:

<div id="inbenta"></div>

Options

Available options of the component, that we will print inside.

headerText

This is the modal window's header text. By default, there is no text.

Methods

You can use methods in this component:

Name Description
open() Open the modal window.
close() Close the modal window.

Example

Open a modal window with popular content inside.

<button onclick="openModal()">Open modal window default template</button>
<script type="text/javascript">
  var modal = sdk.buildModal('default',{},'Build');
  function openModal(){
    modal.open();
  }
</script>