Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ravn on Oct 30, 2009 05:36
open dhtmlx forum
Update window w/tabbar from Parent

Hi!
I have a text input field on page with a tabbar iframe window that I need to update from parent.
It works flawlessly in Firefox, but IE gives the following error:
"tabbar.cells(...)._frame.contentDocument' is null or not an object"

Here is my codeline:
tabbar.cells("b1")._frame.contentDocument.getElementById("myfield").value="newvalue";

Do you have any suggestions?
Answer posted by Alex (support) on Oct 30, 2009 05:52
Hello,

try the following approach instead of one that you use:

var win = tabbar.tabWindow("b1");
win.document.getElementById("myfield").value="newvalue";

Answer posted by Ravn on Oct 30, 2009 06:18
This works in IE but not firefox.
My current workaround is as follows:

   if ( tabbar.cells("b1")._frame.Document )
   tabbar.cells("b1")._frame.Document.getElementById("myfield").value="newvalue";
        else
           tabbar.cells("b1")._frame.contentDocument.getElementById("myfield").value="newvalue";

Not pretty, but it works
Answer posted by Ravn on Oct 30, 2009 06:23
I'm sorry, I see that my respons was a bit hasty.
I'll try your code.
Thanks.