Smarty Manual
Prev | Chapter 8. Custom Functions | Next

# {popup_init}

`{popup}` is an integration of overLib, a library used for popup windows. These are used for context sensitive information, such as help windows or tooltips.

- `{popup_init}` must be called only once, preferably within the `<head>` tag within any page you plan on using the `{popup}` function.

- The path is relative to the executing script or a fully qualified domain path, ie not the relative to the template.

- overLib is written and maintained by Erik Bosrup, and the homepage/download is at http://www.bosrup.com/web/overlib/.

Example 8-26. {popup_init}
    <head>
    {* popup_init must be called once at the top of the page *}
    {popup_init src='javascripts/overlib/overlib.js'}

    {* fully qualified url example *}
    {popup_init src='http://myserver.org/my_js_libs/overlib/overlib.js'}
    </head>

    // the first example will output
    <head>
    <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
    <script type="text/javascript" language="JavaScript" src="javascripts/overlib/overlib.js"></script>
    </head>

Prev | Home | Next
{popup} | Up | {textformat}