|
|
| Author |
Message |
kompressaur
Joined: 20 Jun 2007
Posts: 4
|
Posted: Wed Jun 27, 2007 5:32 pm Post subject: Making The Toolbar Dynamic |
|
|
Hello i hope you dont mind me posting this as im a little stuck on what to do from looking at the Advanced help manual.
I'm trying to make a toolbar that changes the main middle buttons depending on what web page it is on on my site. Say i go to the Horse Racing forum i would like for it to change so as i can add horse racing related links to the main middle section of my toolbar.
Also would this classify as being 'one of the five' toolbars i am allowed with my license or can i have it to change dynamically for each of my 18 forums (same root)
| Quote: | Toolbar changing dynamically for the pages on your website:
You can use JavaScript on pages of your website to change parts of the toolbar on the fly as a user navigates across the pages on your site.
Read More: Page 39 |
ok lets go Page 39....
Bah i don't know how i missed this. Will i need to have an understandment of Java to make the toolbar dynamic? If so can anyone suggest any code or shortcuts for me? I just want to change a few buttons on a few different url's.
All help appreciated and thanks |
|
| Back to top |
|
 |
kompressaur
Joined: 20 Jun 2007
Posts: 4
|
Posted: Wed Jun 27, 2007 5:37 pm Post subject: |
|
|
Just found posted by Admin which might help-
You can add CustomXML to your toolbar and use javascript toolbar
method: CustomXML()
Here is an example on javascript:
| Code: | if(...)
{//right url - adding buttons
MyTool.CustomXML("CustomXML1") = '<TOOLBAR><BUTTON
id="tbs_button_007132" caption="MyButton" visibility="1"
type="Split" command="MyCommand" img="52" hint="MyHint"/></TOOLBAR>';
}
else
{//not right url - remove buttons
MyTool.CustomXML("CustomXML1") = '<toolbar></toolbar>';
} |
I wouldnt know what to edit in that to suit nor what to do with the edited javascript  |
|
| Back to top |
|
 |
kompressaur
Joined: 20 Jun 2007
Posts: 4
|
Posted: Wed Jun 27, 2007 5:50 pm Post subject: |
|
|
It looks like this is the important bit on p54 of the manual.
| Code: | <script>
var MyTool = null;
function ToolBarInit (tool)
{
MyTool = tool;
}
function setname ()
{
MyTool.userName = document.all.uname.value;
MyTool.userid = document.all.uid.value;
MyTool.userpasswd = document.all.upass.value;
MyTool.Reload ();
}
</script>
<body onload="">
UserName:<input name="uname"><br>
UserPasswd:<input name="upass"><br>
Userid:<input name="uid"><br>
<Button onclick="setname()">Set variables</button> |
Can anyone tell me what i should be looking at changing if i just want to change buttons for each differant url?
thanks :hope |
|
| Back to top |
|
 |
Admin Site Admin
Joined: 22 Aug 2006
Posts: 1055
|
|
| Back to top |
|
 |
kompressaur
Joined: 20 Jun 2007
Posts: 4
|
Posted: Mon Jul 02, 2007 10:28 pm Post subject: |
|
|
Thanks Admin. forgive me being manic it's just i spend long hours working on things i dont really understand and after about 72hrs of cigs and coffee and hair pulling.
k i'll go check out tool.url and look for the java document. Ive been doing something else since i last posted this. I'll be back no doubt
thanks |
|
| Back to top |
|
 |
|