Joomla Implementation Component pops a mode (modal) window method _php Instance

Source: Internet
Author: User
Tags smarty template

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.