Besttoolbars Development network

Back to Besttoolbars main site

 

Scripting

From Best Toolbars

Jump to: navigation, search

Q: How can I view the source code of the currently visited page by clicking one button?

A: You should associate the following JavaScript command for button command 'URL Redirection':
<BUTTON id="any_bnt_id" caption="View Source" img="4" command="redirect" visibility="1" href="JavaScript: var  
hhh=window.location='view-source:' + location;"/>  

Q: How can I acces toolbar objects from inside the toolbar banner or bubble scripts?

A: The function inside BANNER or BUBBLE has different name -- DocumentComplete(tool):
var IExplorer;
/ This function will be called after a page is loaded into the browser 
function DocumentComplete(tool)
{
IExplorer=tool.explorer;
} 
After that you can address an HTML page opened in the browser. You can change colors on the page, highlight specific  
words, make the page analysis and many other useful tricks. The below example will change the page background color. 
IExplorer.body.style.backgroundColor="#ff0000";

Q: I want to use the %affiliateId feature, and I am aware that I need to create an affid.dat file where the first line is the affiliate ID.

A: You can include this file into .cab file and then reassemble the toolbar for your affiliates. You can even  
automate this process if you will use cabarc.exe utility (See the documentation here:
http://www.microsoft.com/resources/documentation/WindowsServ/2003/all/techref/en-us/Default.asp?  
url=/Resources/Documentation/windowsserv/2003/all/techref/en-us/cabarc.asp ). 
This utility allows you to pack a file. The .cab archive can be converted into .EXE using our utilities, such as  
CAB2NSIS (download from http://www.besttoolbars.net/downloads/cab2NSIS.zip)

Q: I would like to put a piece of JavaScript code on the button. Could you please tell me how to do it correctly?

A: You can associate JavaScript directly with a button like it is below: 
<BUTTON id="btn_01" caption="Test button" href="javascript:location.href='http://www.furl.net/';" > 
Or like this:
<WEBJUMP href="javascript: var  
WN7z=open('http://softomate.com',,'width=400,height=200,scrollbars,resizable,menubar');/
Personal tools

Copyright © Softomate, 2008. All Rights Reserved
Terms of Service | Privacy Policy