Popup Window

Navigation:  Development > MVC (Model View Controller) > View > Admin Theme >

Popup Window

Previous pageReturn to chapter overviewNext page

We can create some easy model by JavaScript. A model has two part.

 

1.Link to view the Popup: We create a link with id "dialog-modal-open"

2.Model Element: Model element id must be "dialog-modal"

 

Just after this a model creation is done. For exampkle
 
<a href="#" id="dialog-modal-open">Open</a>
<div class="dialog-modal"> Model Contain here</div>

 

Basically we add all model javascript in /webroot/addons/dialogs/smooth.dialots.js

 

We can configure a new model like below JavaScript
 

 // Code for Modal/Message Element <div class="dialog-message">Hello World</div>
  jQuery(".dialog-message").dialog({
        autoOpen: false,
        modal: true,
        buttons: {
            Ok: function () {
                jQuery(this).dialog('close');
            }
        }
    });
 
    // Code for link to open the box <a herf="#" class="dialog-message-open">Open Box<a>
    jQuery(".dialog-message-open").click(function () {
        jQuery(".dialog-message").dialog("open");
        return false;
    });