aquiring object reference from dhtmlXWindows

I am using the file referenced at Jun 27, 2008 06:34 in : … %20defined

I am attempting to populate a dropdown list via Javascript. My code is:

var dhxWins = new dhtmlXWindows();


dhxWins.setViewport(0, 0, 900, 5000); = “#909090 1px solid”;



var w1 = dhxWins.createWindow(“w1”, 10, 10, 320, 240);



objWindowContent = window(‘w1’)._frame.contentWindow;

objlist = objWindowContent.getElementById(‘medCenterLocation’);

The last line fails with the error:

uncaught exception: [Exception… “Cannot convert WrappedNative to function” nsresult: “0x8057000d (NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)”

Thanks in advance.


The latest window version allows to use _frame property. So, it is better to download the new one.

Moreover, please, be sure that the page inside iframe is already loaded. Possibly you need some timeout.

If you load page from the same domain, you can use ajax loading. In this case, content is available after “onContentLoaded” event call:


if(win==w1) objlist = document.getElementById(‘medCenterLocation’);


The sample can be found in the windows package dhtmlxWindows/samples/init/attach_url_ajax.html