XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 4th, 2004, 01:04 PM
paolodina paolodina is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 paolodina User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question From html call methods defined in xbl. Help.

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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > From html call methods defined in xbl. Help.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway