Open a Lightbox link in the parent page
(November 4, 2009)
"Open a link in a Lightbox in the same page the Lightbox was started from"
Question:
How can I have a link within a DMXzone Lightbox open in the parent page?
Answer:
A simple javascript function can be used to set the link from a DMXzone Lightbox to be opened in the parent page. Place the following code in the Head of your Lightbox page:
<script type="text/javascript">
function OpenInParent(url){
parent.parent.document.location = url;
}
</script>
Set the link on you Lightbox page as follows:
<a href="javascript:void(0);" onclick="OpenInParent('YourPage.html')">YourLinkText</a>
Patrick Julicher
Patrick started developing websites at the age of 25, only using HTML and building simple websites. Through the years his passion for designing and developing grew, and his career moved in that direction in the year 2004, when he decided to try and get a job in ICT and Web Development.
He got this chance at WE ICT, based in Nijmegen, The Netherlands. For the first couple of years he combined network management for customers with creating database-driven websites in ASP. Since 2008 his main work is on the developing part.
While ASP is still his favorite language, he's slowly trying to dive into ASP.NET and discover all of the possibilities.







