Solved

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

Posted on 2011-03-01
6
1,959 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 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

628 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