Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Andrew on Nov 26, 2009 05:40
open dhtmlx forum
dhtmlxWindow attachUrl - problem with iframe

When I attach URL to dhtmlxWindow defined on page inside iframe, the window disappears.
Answer posted by Alex (support) on Nov 26, 2009 06:02
Could you please provide the sample to recreate the issue ?
Answer posted by Andrew on Nov 26, 2009 11:51

I decided to make a sample test page because the original is asp with a lot of code not relevant for the case.

And trying to check it with page source for iframe, I found that my problem was not with iframe itself but with the order of script commands:

function showW2() {
   w2.show();
   w2.attachURL('http://yahoo.com', false);
}

will work, but in the case

function showW2() {
   w2.attachURL('http://yahoo.com', false);
   w2.show();
}

w2 will not appear either in AJAX mode or not. Window w2 is initialized and hidden, the function is called from <a> onclick event.

Iframe issue comes out when I use

function showW2() {
   w2.attachURL('http://yahoo.com', false);
   w2.show();
}

inside iframe. In AJAX mode it will work, but not in other case.

So, the answer is found. It was just a strange behavior in iframe with AJAX mode.