hello.
i have an error when the tabbar is in initialization using javascript. the function new dhtmlXTabBar(“tab”) throws an exception with the message “document.defaultView.getComputedStyle(this.entBox, “”) has no properties”
i assume that entBox is a reference to the div named “tab” in my html. this tab has a css with the syle properties of width, height, position, etc.
why it says that it doesnt have properties?. how can i fix that error?
Thanks.
The problem may occur when you init tabbar in one iframe|window from some other iframe|window. In such case pointer to current document can be mixed and cause mentioned problem
It may occur only when size of tabbar not clearly specified and component tries to detect it automatically.
To resolve problem just set sizes of tabbar’s container as
<div width=“some” height="some"
or as
<div style=“width:some; height:some;”
Thanks for the answer.
I found that the problem in this case was because i was calling the initialization process when the object containing the div (an iframe) had the display property set to “none”.
when this happens, the results from the function defaultView.getComputedStyle(); are all null values. I dont know if this is already a known bug (firefox), since that is not a correct behaviour.
the conflict was solved setting the display = “block” before all the others initializations that haves the page. hope this can help someone with the same problem…
"window.getComputedStyle(this.entBox, null) has no properties this.entBox, null)[“width”]) " which is a blocking issue as the url is not displayed
I have also set my tabbar’s container height and width as
Also the frame’s style which I want to display on click of a button I have set as block
var ref_iframe = parent.document.getElementsByTagName(‘iframe’)[0];
// This line will refresh the current page
ref_iframe.src = "/url;
document.getElementsByTagName(‘iframe’)[0].style.display=“block”;
But still it is not working.
Could you guide me where is the issue ?
Regards,
Lalit
Got this issue resolved.
There was error in accesing
var ref_iframe = parent.document.getElementsByTagName(‘iframe’)[0];
So I have used document.location.href to access the iframe
Thanks,
Lalit