Accessing to grid in iframe loaded in accordion's cell.

Dear support,



An other small problem for me with an iframe in a accordion’s cell (loaded with attachURL(…)).

Everything works fine, and I have a grid correctly loaded in the iframe and so on … , and can access to “HTML objects” with some “classical” method like "getElementById(…) for example.

But I would like to access to my dhtmlxGrid for it’s properties and methods, like:

"

accordion.cells(“my_cell”)._frame.the_grid.getCheckedRows(1);



"

It might be a misunderstanding from myself of simple javascript technic, sorry, but I don’t know how to access to the grid directly.

I’ve tried things like:

"

accordion.cells(“my_cell”)._frame.contentWindow.the_grid.getCheckedRows(1);

"

Etc …



Thanks,

Regards,

vinc.

If grid was created as

the_grid = new dhtmlXGridObject(…
or
the_grid = some_obj.attachGrid(…

then used syntax is correct
accordion.cells(“my_cell”)._frame.contentWindow.the_grid

Beware that if grid object was defined as “var the_grid” inside some kind of function ( not on top level ) - it will be visible only inside this function and not visible for any other scripts.

Hi,
That was it -> " object was defined as “var the_grid” inside some kind of function ".
So, I found a solution and change the code in order to be able to get the grid.

Many thanks,
vinc.