This article illustrates a method for the Joomla implementation component to eject a mode (modal) window. Share to everyone for your reference, specific as follows:
The most critical JS in/media/system/js/modal.js. There are two ways in which you can implement the template file default.php of the extended component.
Mode one:
<?php jhtml::_ (' Behavior.modal ', ' a.modal ');? >
<a rel= "{handler: ' iframe ', size: {x:570, y:400}}" href= "/index.php" class= "modal" >view</a>
It is so simple to achieve, the rest of the things joomla! all to help you deal with. Be happy!
Mode two:
<script src= "/media/system/js/modal.js" ></script>
<link rel= "stylesheet" href= "/media/system/" Css/modal.css "type=" Text/css "/> <a id=" aatest "
onclick=" f () ">view</a>
<script>
function f () {
squeezebox.fromelement (null, {handler: ' iframe ', size: {x:570, y:400}, href: '/index.php '}); c12/>};
</script>
Generally, it is better to use the first one, if you want to study how modal.js is actually implemented, the second way makes an example of getting started.
More about Joomla interested readers can view the site topics: "The introduction of YII framework and common skills summary", "PHP Excellent Development Framework Summary", "Smarty Template Primer Tutorial", "thinkphp Common Methods Summary", "PHP object-oriented Program Design Introductory Course" , PHP string (String) Usage summary, "PHP+MYSQL Database Operations Tutorial" and "PHP common database Operation Skills Summary"
I hope this article is helpful to everyone based on the Joomla program design.