Auto load Modal SqueezeBox in Joomla

 : share this : comments : by Jonathan Lackey

I needed to load a modal pop-up on page load for a Joomla component I am working on. It's actually pretty easy to do. The code is below. This is developing in the Joomla 1.5 framework using the core MooTools 1.1 and SqueezeBox 1.0.

if( $params->get('show_disclaimer') == 1 ){

$js = 'window.addEvent('domready',
function(){SqueezeBox.setContent('iframe',\'http://zunostudios.com\')});';

JHTML::_('behavior.mootools');
JHTML::_('behavior.modal');
$doc->addScriptDeclaration($js);

}
tags: joomla | development | web design

1 Comment

Feed
  1. 1 :  daniel miranda makes this comment : 07.15.2010
    avatar
    Many thanks, very good idea.

Add Comment

Zuno Studios is a Los Angeles web design company. Powered by the Joomla! Framework