Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Call JHTML::_( 'behavior.modal' ) fromt outside

Posted on 2011-03-01
6
Medium Priority
?
1,962 Views
Last Modified: 2012-05-11
Hello,

i have two websites. One with FLash and one with Joomla. In Joomla i call a Lightbox with JHTML::_( 'behavior.modal' ). Now i´d like to call this also in the HTML where the swf (Flash site) is stored.

<script type="text/javascript">
window.addEvent('domready', function(){
    var myAnchor = new Element('a', {
        'href': 'http://www.test.com',
        'class': 'myClass',
		'scrolling':'no',
        'rel' : "{handler: 'iframe', size: {x: 1120, y: 610}}"
    });
    SqueezeBox.fromElement(myAnchor);
});
</script>

Open in new window


Please is it possible to call JHTML::_( 'behavior.modal' ) from outside the Joomla directory?

Or is there another way?

Thank´s for helping!
0
Comment
Question by:druplash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 7

Expert Comment

by:rashgang
ID: 35014832
No we cannot call joomla jhtml outside of the directory. please use this lightbox modal window
http://www.1stwebdesigner.com/freebies/ajax-lightbox-modal-dialog-solutions/
0
 

Author Comment

by:druplash
ID: 35014905
Thank´s for your answer.But how can i load one of these lightbox modal windows at <body onLoad>?
It has to load automaticlly when somebody opens the website.
0
 
LVL 7

Accepted Solution

by:
rashgang earned 2000 total points
ID: 35014941
you can try this
http://www.emanueleferonato.com/2007/08/22/create-a-lightbox-effect-only-with-css-no-javascript-needed/

otherwise you need to manually insert the ajax ligtbox model window and call in on body
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:druplash
ID: 35014960
Thank´s for the link. But please can you show me an example how to call the lightbox without clicking anything. like above in my Joomla example. I need a lightbox (with iframe) that opens when somebody visit the website.
0
 

Author Comment

by:druplash
ID: 35014970
I get it working!

<body onLoad="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">
		<div id="light" class="white_content">This is the lightbox content. <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div>
		<div id="fade" class="black_overlay"></div>
	</body>

Open in new window


Thank´s!
0
 

Author Closing Comment

by:druplash
ID: 35014972
Thank´s!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question