We help IT Professionals succeed at work.

Need a jquery pop out that uses an iframe.

jbrashear72 asked
Last Modified: 2012-05-08
I need to click on a link in my site and have a window over lay the screen line in a lightbox were the rest of the screen goes dark/grey. The content in this box, dialog/lightbox needs to come from an iframe. I need to be able to stay with in the iframe till the search is done and and the 2nd page it loads is complete then have a button that allows me to close the query over lay.

How is this done? I need help with this step by step.

Thank you.
Watch Question


Here is what I have so far:

It is tied to <a> correct?

I need to have it tied to a class or ID how do I do that? This wany not every link comes up in a dialog.
	<link rel="stylesheet" href="./styles/smoothness/jquery-ui-1.7.2.custom.css" type="text/css" media="screen" />
	<script type="text/javascript" src="./scripts/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="./scripts/jquery-ui-1.7.2.custom.min.js"></script>
	<script type="text/javascript">
	$(function() {
		$('a').click(function(e) {
			var $this = $(this);
			var horizontalPadding = 30;
			var verticalPadding = 30;
	        $('<iframe id="externalSite" class="externalSite" src="' + this.href + '" />').dialog({
	            title: ($this.attr('title')) ? $this.attr('title') : 'External Site',
	            autoOpen: true,
	            width: 800,
	            height: 500,
	            modal: true,
	            resizable: true,
				autoResize: true,
	            overlay: {
	                opacity: 0.5,
	                background: "black"
	        }).width(800 - horizontalPadding).height(500 - verticalPadding);	        
		<li><a id="imdb" href="http://www.test.com/imdb" title="IMDB Movie Search">imdb - internal search</a></li>
		<li><a href="http://imdb.com" title="IMDB Site">IMDB</a></li>

Open in new window

This one is on us!
(Get your first solution completely free - no credit card required)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.