Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Loading URL into iframe_ARG!
Old 08-03-2010, 11:47 AM Loading URL into iframe_ARG!
Junior Talker

Posts: 2
Name: Tiss
Trades: 0
We're trying to load the following URL into an iframe. For whatever reason, the site refuses to load properly the first time. (click to see what I mean). On reload, the site displays properly. Our solution, which works properly in some browsers (chrome and firefox) has been to force a reload with Javascript. The iframe source is declared in the HTML, so it should load the first time when the page loads. Its redeclared in jQuery, within a function which displays the hidden iframe. (to hide the iframe initially, we tried display:none, but I read that that can cause problems with iframes in some browsers, so we switched to visibility:hidden.)

In a nutshell, the problem is:
In Safari, we cant get the iframe to reload; all we see is the erroneous initial load of the URL. However, if we force a reload of the URL outside of our website, i.e. in it's own browser window, and then come back to our website, it works, presumably since safari has cached the url and has it onhand.
In IE, we see nothing. Blank iframe, also not responding to our forced reload.

Here's the javascript.

Code:
function cred_mi()
{
//this is the second loading of the iframe source, the first load happens in the html
$('#lightbox_iframe').attr('src', 'https://www2.dleg.state.mi.us/colaLicVerify/controller?searchType=detail&entityId=1240913&l2K=Y&licNbr=2101101211&licId=946445&detailType=Individual');   
 //other lightbox function handling
$('#control').empty().html('<a class="np" href="javascript:turnOff()">Close</a>');
$('#lightbox_img').css('display', 'none');
        $('#lightbox_p').empty();
//display lightbox and iframe
$('#lightbox').fadeIn(500);
$('#scrim').fadeTo(500, 0.5);
$('#lightbox_iframe').css('visibility', 'visible');
//wait for all above to finish, and then force a reload.
$(document).ready(function(){window.frames('lightbox_iframe').reload(true);});
}

Last edited by chrishirst; 08-03-2010 at 05:56 PM..
Esplin94 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-04-2010, 11:54 AM Re: Loading URL into iframe_ARG!
Extreme Talker

Posts: 246
Trades: 0
Can you provide a URL?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 08-19-2010, 03:10 PM Re: Loading URL into iframe_ARG!
Junior Talker

Posts: 2
Name: Tiss
Trades: 0
Actually figured it out. Thanks for replying though...
Esplin94 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Loading URL into iframe_ARG!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.43948 seconds with 12 queries