|
|
| Author |
Message |
kiran.bokhari
Joined: 15 Feb 2010
Posts: 15
|
Posted: Thu Feb 18, 2010 3:42 pm Post subject: CustomXML problem |
|
|
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
|
Posted: Fri Feb 19, 2010 5:21 am Post subject: |
|
|
| Custom XML allows to change the toolbar from a webpage, so put Javascript code into your HTML |
|
| Back to top |
|
 |
|