views:

37

answers:

0

I need a loading graphic to appear for pages in a lightboxed iframe with a different domain than the parent (checkout.netsuite.com). The pages that aren't triggering the graphic aren't requested via ajax (ie. no $.post()). The page that does correctly call the loading graphic is requested via $.post().

3 steps to see the difference between the working same-domain requested page, and the problem page that's a different domain than the parent:

  • Click on the "click here to order" button here: http://www.game onglove.com/ gog/ test3.html;
  • click the same button on the lightboxed window that pops up (the loading graphic appears here)
  • then hit "proceed to checkout" to see the non-ajax content that I'd like to trigger a loading graphic on, as I did with the previous lightboxed page.

How do I get the pages that are on a different domain in the iframe to trigger the loading graphic?

I thought this was the most promising idea:

In the iframe:

try{
if (parent){
parent.hideIframe();

$(document).ready(function() {
parent.showIframe();
});
}
}catch(err){}

In the parent page:

function hideIframe(){
$('#cboxLoadedContent').hide();
}
function showIframe(){
$('#cboxLoadedContent').fadeIn('slow');
}