IFRAME API

Using the IFRAME API you can integrate own content seamlessly into LiveConfig and thus extend its features. This is done by embedding content from an external URL into the LiveConfig user interface using an <IFRAME> tag. The external page gets informations about the logged-in user via CGI variables.

Creating own content

When clicking on a custom link page, LiveConfig creates an <IFRAME> which contains the configured destination URL. This IFRAME has a width of 100%, and its height is scaled by JavaScript to the height of the embedded content - so usually no separate scrollbar should appear.

An example script as well as some helper methods can be found in the knowledge base.

There are nearly no limits when designing the pages to be embedded. Only a few things have to be considered:

  • usage of lc-api.js

    To automatically adjust the size of the IFRAME, a specific JavaScript function must be called as soon as the content has been loaded completely. The file lc-api.js contains the necessary code.

  • CGI parameters sid, ts, chk and lang

    LiveConfig automatically adds the CGI parameters sid (session ID of the LiveConfig user), ts (current time stamp), chk (checksum) and lang (selected language) to the destination address to be called. With the checksum, manipulations in the CGI parameters can be quickly recognized. With the help of the session ID, a call to the SOAP function SessionCheck can be used to check whether the user is currently still logged in to LiveConfig - additional information is also returned, including the login name, the full name and a list of all assigned subscriptions.

    If you use your own input forms within the embedded page, it is best to pass on these CGI parameters so that you can check the validity of the session at every processing step. In more complex applications, you can also create your own PHP session for this visitor and store the CGI parameters mentioned as session data.

    For a complete example please take a look at example.php in the example package (see above).

If the displayed data should visually match the other LiveConfig pages, you can find the right CSS styles with lc-api.css.


Last updated on May 04, 2020.
next: Customization
previous: LC.timeout.*