This widget encapsulates the popupWindow JQuery Plugin.
Takes a link (or other HTML element) and will create a popup window
Yii 1.1.6 or above...
<h1>popup window</h1> <p> Open yahoo.com in a popup window (800x500) positioned 50 pixels from the top and left side of the screen. </p> <p> <?php $this->widget('ext.popup.JPopupWindow', array( 'content'=>'open popup', 'url'=>"http://www.yahoo.com", 'htmlOptions'=>array('title'=>"yahoo.com"), 'options'=>array( 'height'=>500, 'width'=>800, 'top'=>50, 'left'=>50, ), )); <!-- popup --> </p> <p> Open contact form of a Yii skeleton app </p> <p> <?php $this->widget('ext.popup.JPopupWindow', array( 'tagName'=>'button', 'content'=>'open contact form', 'url'=>array('/site/contact'), 'options'=>array( 'height'=>500, 'width'=>800, 'centerScreen'=>1, ), )); <!-- popup --> </p>
Total 3 comments
this extension is working fine. thanks.
I have integrated the extension, when i click on the link for popup it gives me error in console as "sBaseUrl is not defined" i have used EDataTables extension to display the data using ajax. not sure if its conflicting with it.
Thanks and advance. Shreyas
I don't know if anyone else had this problem..
Only when debug mode of Yii was off and whenever a popup button was in a view page a "Hello, new User" alert would popup.
It's located in jquery.popupWindow.min.js in the end of the file.
I suppose it should be removed??
Leave a comment
Please login to leave your comment.