Solved

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

Posted on 2011-03-01
6
1,946 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now