smarty template engine
Friday, May 16, 2008  
download | documentation | faq | forum | mailing lists | changelog | contribs 


search for in the  


{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>

XHTML validation: The {popup_init} does not validate with strict and you will get the error document type does not allow element "div" here; (ie a <div> tag in the <head>). This means you will need to include the <script> and <div> tags manually.




 

credits 

Smarty Copyright © 2002-2008 New Digital Group, Inc.
All rights reserved.
Last updated: Tue Feb 12 09:11:24 2008 CST