View Full Version : problem with refresh in IE 7

13 Feb 2007, 5:37 PM
I'm using yui .33 with Borderlayout.

When I show my layout in IE the first time, it shows fine. When I click the refresh button, I get a javascript error:

line 762, char 441
'this.el.id' is null or not an object
Code: 0

and then I get an IE "Internet Explorer cannot display the webpage" connection error. Any insight?

Thanks, WILL

13 Feb 2007, 5:58 PM
Hard to say without seeing a link or code? Does it work in FF?

13 Feb 2007, 6:33 PM
most of the time. my colleague claims he's seen this in Firefox too, but IE is the most frequent problem.

We're using 4 calls to the SWFObject script. Interestingly, commenting out SWFObject causes the problem to go away. But the error occurs in the yui-ext.js script.

14 Feb 2007, 1:08 PM
I've made a little more headway with this.

One of the content panels uses multiple instances of SWFObject ( http://blog.deconcept.com/swfobject/ ) to dynamically load Flash objects into a div within the page.

It appears that if the Flash object is not fully loaded (perhaps due to Network delays), then IE will generate a yui-ext error when the updatemanager is called. Apparently it can't find some type of object. I've used FireBug (in IE) debugging statements to confirm that the div element "db_pricebar" is empty (e.g. not filled up with the Flash object) when the yui-ext error occurs.

Any suggestions?

Here's my yui-ext code:

MasterLayout = function(){
return {
init : function(){

// specify the master layout size & characteristics
var layout = new YAHOO.ext.BorderLayout(document.body, {
north: {
autoScroll: false
south: {
autoScroll: false,
east: {
autoScroll: false,
center: {
autoScroll: true

// assign the tabs to the master layout
layout.add('north', new YAHOO.ext.ContentPanel('section-top', {closable:false}));
layout.add('east', new YAHOO.ext.ContentPanel('section-right', {closable:false}));
layout.add('center', new YAHOO.ext.ContentPanel('section-middle', {closable:false}));
layout.add('south', new YAHOO.ext.ContentPanel('section-bottom', {closable:false}));



YAHOO.ext.EventManager.onDocumentReady(MasterLayout.init, MasterLayout, true);

And here's one of the content panel divs from the page (excerpted)

<div id="body-content">

<div id="db_pricebar">

<script type="text/javascript">
var so = new SWFObject("$graphType", "mymovie", "$graphWidth", "$graphHeight", "8", "#ffffff");
so.addVariable("dataURL", "$data");
so.addParam("wmode", "transparent");
so.addVariable("chartWidth", "$graphWidth");
so.addVariable("chartHeight", "$graphHeight");


14 Feb 2007, 1:27 PM
Move the SWF code into an EventManager.onDocumentReady. You are catch the dom in a read-only state (rare problem in IE when you modify the DOM inline).

14 Feb 2007, 2:35 PM
Should the SWFObject methods be called before or after the MasterLayout.init content? (e.g. the setup and update of the layout).


15 Feb 2007, 3:32 AM
I would call them after personally, but both should work.

15 Feb 2007, 8:12 AM
Thanks for the help. Ended up putting this before the layout init. The problem seems to have gone away.