1

This question has been brought up a few times in a few other places but never has really been answered. My problem is this.

I have 4 iframes on a pages, each point to the same domain, requesting the same resources, but display different results based on the parameters. The iframes are being loaded through JQuery. Example

//Get the data needed for form the iframe
var domain = $('#domain').val();
var application_id = $('#application_id').val();
var url = 'http://' + domain + '/appearance/theme/' + application_id  +'?device=';

//Load an empty iframe into the page
$('<iframe src="" height = "400px" id="iphone_demo" name="iphone_demo" ></iframe>').appendTo('#iphone_frame');
$('<iframe src="" height = "400px" id="android_demo" name="iphone_demo" ></iframe>').appendTo('#android_frame');
$('<iframe src="" height = "600px" id="ipad_demo" name="iphone_demo" ></iframe>').appendTo('#ipad_frame');
$('<iframe src="" height = "600px" id="facebook_demo" name="iphone_demo" ></iframe>').appendTo('#facebook_frame');

//Now set the iFrames source
$('#iphone_demo').attr('src', url + 'iphone');
$('#android_demo').attr('src', url + 'android');
$('#ipad_demo').attr('src', url + 'ipad');
$('#facebook_demo').attr('src', url + 'facebook');

The iframe "#iphone_demo" works perfectly fine. The other iframes crash because it appears that all the js scripts file are never loaded. The JS script files are aggregated using PHP. And this ONLY happens in FireFox.

The server is Centos 6, using apache and serving pages through PHP. Does anyone have any ideas why this is happening.

Devin Dixon
  • 11,553
  • 24
  • 86
  • 167
  • We can't see what's being loaded to cause the iframe to "crash". Can you show us the page or the HTML of a page that loads in an iframe? They're not ajaxed in they are loaded as pages. – Popnoodles Nov 25 '12 at 13:55
  • By crash I mean that the app in the iframe is using backbone. In the first iframe backbone loads successfully, in the other iframes they all say backbone.js is undefined. – Devin Dixon Nov 25 '12 at 14:14
  • The iframe is a separate web page, not like when you load in html asynchronously. Those pages all need the js includes too. – Popnoodles Nov 25 '12 at 14:17
  • They have them included. It works on other browsers, just not Firefox. Looking at a few other threads, firefox has had problems with iframes. – Devin Dixon Nov 25 '12 at 14:33
  • So everything is being done correctly. In which case it's hard to diagnose without being able to view the page. If you're lucky someone will have resolved this problem before and see this. – Popnoodles Nov 25 '12 at 15:09

0 Answers0