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 
Given the current url, we'd like to display/hide a button

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



Joined: 29 Aug 2006
Posts: 48

PostPosted: Tue Aug 29, 2006 9:14 am    Post subject: Given the current url, we'd like to display/hide a button Reply with quote

Given the current displayed url, we would like to display or hide a
button on the toolbar.

By using <INCLUDE_XML>, it looks like I can have a custom script called
on BeforeNavigate or OnDocumentComplete. I can send the %url value to the server script so it can detect whether or not the button should be
add to the toolbar, to taken away.

My question is: what is the script returning so that this button is
added or removed?
Back to top
Admin
Site Admin


Joined: 22 Aug 2006
Posts: 1055

PostPosted: Tue Aug 29, 2006 10:22 am    Post subject: Reply with quote

You can add CustomXML to your toolbar and use javascript toolbar
method: CustomXML()

Here is an example on javascript:

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>';
}
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