Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Gaizka on Feb 25, 2009 23:06
open dhtmlx forum
dhtmlxMenu - dhtmlXCalendar error: "dhtmlxMenuObject is not defined"

I've a page with a Menu and some calendars. In Firefox everything works fine but in IE7 "everything works" but I get an js error: "dhtmlxMenuObject is not defined". I've been debugging dhtmlxcalendar.js code and I've seen this part of the code:

    if(_isIE){//add iframe under calendard in IE (IE 6 issue with select box fix)
        if(this.parent.style.zIndex==0){
this.parent.style.zIndex = 10;
        }
if(this.ifr == undefined && this._dblC == undefined){
this.ifr = document.createElement("IFRAME");
this.ifr.style.position = "absolute";
this.ifr.style.zIndex = 1;
this.ifr.frameBorder = "no";

this.ifr.src = window.dhx_globalImgPath+"/blank.html"
this.ifr.style.top = this.entObj.offsetTop + 'px';
this.ifr.style.left = this.entObj.offsetLeft + 'px';

this.ifr.style.display = this.parent.style.display;
this.ifr.className = this.style + (this.skinName?'_':"") + this.skinName + "_ifr";

this.parent.appendChild(this.ifr);
//document.body.appendChild(this.ifr);
        }

The error is in the last line:
this.parent.appendChild(this.ifr);

If I remove it everything works fine but I don't know this is right.

Thanks,
Gaizka

Answer posted by Support on Feb 26, 2009 05:54
>> in IE7 "everything works" but I get an js error: "dhtmlxMenuObject is not defined"

Try this:

<body onload="doOnLoad();">
...
<script>
    var dhxMenu;
    function doOnLoad() {
        dhxMenu = new dhtmlXMenuObject(...);
    }
Answer posted by Gaizka on Feb 26, 2009 22:05
The Menu object works well, and the calendars too. Every new is in the body onload, but I get the error.
Answer posted by Alex (support) on Feb 27, 2009 04:28

The issue is not recreated locally.

Could you please provide the sample where it can be reproduced ?