Besttoolbars Development network

Back to Besttoolbars main site

 

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
CustomXML problem

 
Post new topic   Reply to topic    BestToolbars.Net Forum Index -> General questions
Author Message
kiran.bokhari



Joined: 15 Feb 2010
Posts: 15

PostPosted: Thu Feb 18, 2010 3:42 pm    Post subject: CustomXML problem Reply with quote

I'm trying to follow the example on CustomXML in the manual(pg 45).

I have created a CustomXML object in the toolbar but what I am confused about is that there is no option to specify the Javascript file that will be used in the CustomXML file.

Do I place the following javascript code in basis.xml?
Code:
<script language="JavaScript" type="text/javascript">
var m_TBObj = null;
function ToolBarInit(softomate_toolbar) {
m_TBObj = softomate_toolbar;
}
function customxml () {
if(m_TBObj) {
var s = Math.random() * 10 + "";
var n = s.substr(0,1);
m_TBObj.CustomXML("CustomXML") = '<toolbar><text id="12312" caption="Number is ' + n + '"/></toolbar>';
m_TBObj.Reload();
}
}
</script>
<button onclick="javascript:customxml();">CustomXML Demo</button>


Thanks
Back to top
Admin
Site Admin


Joined: 22 Aug 2006
Posts: 1055

PostPosted: Fri Feb 19, 2010 5:21 am    Post subject: Reply with quote

Custom XML allows to change the toolbar from a webpage, so put Javascript code into your HTML
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BestToolbars.Net Forum Index -> General questions All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group

Copyright c Softomate, 2010. All Rights Reserved
Terms of Service | Privacy Policy