Solved

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

Posted on 2011-03-01
6
1,953 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
  • 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 500 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

820 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