|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all, recently i experienced a tedious problem..
I had the need to integrate xul code into html, and using xbl i accomplished that task. Now i have html pages that uses xbl bridge to embed xul elements. One of my bindings in xbl declares some methods too. In particular: <implementation> <method name="addAnotherTab"> <body> var value=document.getAnonymousNodes(this)[0]; var tab = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "tab"); tab.setAttribute("label", "An other one"); all_tabs = value.getElementsByTagNameNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "tabs"); all_tabs = all_tabs.item(0); all_tabs.appendChild(tab); </body> </method> </implementation> When i call this method from html using something like: <a href="#" onclick="document.getElementById('ws').addbutton()">click</a> all works fine. But... if i call the method in <body onload="..."> to automatically add a tab, it does not work. Do you have a solution for me? Thanks a lot, Paolo Dina |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > From html call methods defined in xbl. Help. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|