Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Scott Bailey on Sep 08, 2008 02:39
open dhtmlx forum
dhtmlxWindow not loading

Hello,

We are using the pro version of the suite but have just downloaded the standard version of dhtmlxWindows as this was added after we brought the suit. It looks like it should be good enough as it is. However I am getting errors when trying to initialise a window.

I have included all the relevant files in my page but when I call

var dhxWins = new dhtmlXWindows();
var win = dhxWins.createWindow(1, 150, 150, 200, 200);

I get the following error?

this.wins[a].style is undefined

caused by
[Break on this error] "aqua_sky": {"header_height": 31, "bord...+"' class='dhtmlx_wins_"+this.skin+"'>"+
dhtmlxwindows.js (line 23)

I am using the standard skin.

Any Ideas?
Many thanks
Scott Bailey

Answer posted by Support on Sep 08, 2008 05:10
Hello,

try this way:
....
var win = dhxWins.createWindow("1", 150, 150, 200, 200);
Answer posted by Scott Bailey on Oct 30, 2008 04:22

Hello,

 

I am revisting this and have narrowed down the coase of the problem. We are using ViaMichelin maps on anothre part of he page, as soon as I take out the link for this the error goes away. This is the link for the script we include for the maps

<script src="http://api.viamichelin.com/apijs/js/api.js"
        type="text/javascript"></script>

Would you have any suggestion without habing to look into the scripst for this?

 

Scott

 

 

Answer posted by Support on Oct 30, 2008 04:31
Hello,

Try to use string id for window. Demo or live link will help us to understand the root of issue.
Answer posted by Scott on Oct 30, 2008 05:29

Hello,

It fails before even calling the create window line it fails on

var dhxWins = new dhtmlXWindows();

I have been reading some forums on other problems with viamichelin and it seems that they extend the prototype object


>
> // http://www2.viamichelin.com/vmw2/fwk/cmn/VMPrototypes.jsp?charset=UTF-8" target=_top rel=nofollow>http://www2.viamichelin.com/vmw2/fwk/cmn/VMPrototypes.jsp?charset=UTF-8
>
> Object.prototype.ci = function(tF)
> {
>        tF.call(this);
> };
>

See this link

http://www.nabble.com/Jquery-and-ViaMichelin-Maps-Api-Problem-td17644599.html#a17644599

Would it be this that is breaking this and if so is there a work around?

Many thanks

Scott

 

 

Answer posted by Scott Bailey on Oct 30, 2008 06:14

I have created two test pages whch demonstrate the problem

 

The first has the problem

http://www.axscend.com/testwindow.php

The second doesn't (not I have included minimal files here so the window doesn't display properly but it is working.

http://www.axscend.com/testwindow2.php#

Scott

 

Answer posted by Support on Oct 30, 2008 06:31
Try this:


add the following code into dhtmlxwindows.js:

...
this.wins = {};
...
// here
for (var a in this.wins) delete this.wins[a];
Answer posted by Support on Oct 30, 2008 06:35
In your samples you initting windows before <body> rendering.
Windows use document.body as a default viewport. If <body> not rendered you'll get an error.
Answer posted by Scott Bailey on Oct 31, 2008 02:30

Hello,

This takes it one step further the window appears though blank but i now get the error

this.wins is undefined

Thanks

Scott

 

Answer posted by Scott Bailey on Nov 17, 2008 05:41

Hello,

This has turned out to be a badly written script by michelin - to get around this I have attached the map to a tabbar in an inline frame. This prevents the code interfering. Just thought I would lpost this in case anyone else has this problem.

Scott