Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-03-01
6
Medium Priority
?
1,963 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 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
Independent Software Vendors: 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Suggested Courses

972 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