Calendar Bug in IE7 in render method?
- Hi, I am trying to develop using the latest YUI (2.2.1) Calendar object.
My code, which loads a single Calendar is below. Based on the alert's I used for
debugging, the error occurs at the .render step in the initCal method only on IE7, it works
great in FireFox 2.
//alert('creating teh calendar and listeners');
var overlay = document.getElementById("startdate");
var parent = overlay.offsetParent;
var x = 0;
var y = 0;
//alert('parent = '+parent);
x = x + parent.offsetLeft;
y = y+ parent.offsetTop;
parent = parent.offsetParent;
//alert(' position at "'+x+'" and "'+y+'"');
var cal = document.getElementById("callContainer");
left = x;
top = y;
YAHOO.registry.calendar.evCal = new YAHOO.widget.Calendar("evCal","callContainer",
pagedate:"$registry.getMmyyyyStartDate()", title:"Choose a date:", close:true} );
var rslt = YAHOO.util.Event.addListener
//alert('added listener to date field, rslt = '+rslt);
YAHOO.util.Event.addListener(window, "load", initcal);
I am wondering if this is a bug, of if anyone has ideas on how I can solve it.
- HI all -
I solved my cross browser problem. After much debugging of the scripts and my code, I
found that my <div id="callContainer"></div> which is the outercontainer for the Yahoo
Calendar object was located outside the bounds of an HTML element. It was between two
Firefox is forgiving. But IE got an object error when attempting to write the .innerHTML
property (in the calendar.js render() method). During the course of debugging, I was able to
read from this object, but could not write to it.
ANyway, problem solved. It was just an HTML structure problem.