amy_silverman wrote:Dumb question (I'm sure), but where is the toolbar.js file? I've looked through my HTML5 build folder and cannot find this file.
Amy, not a dumb question at all.
First,
toolbar.js is a javascript that is created when compiling HTML docs.
There are two ways to add scripts to
toolbar.js:
1) The typical Flare way...
a) Within Flare, open your default HTML skin (i.e.
DefaultHTML5):
b) Select the
Toolbar tab
c) You will see a window, "
Custom JavaScript to include in Toolbar page:"
d) Enter your script in there.
e) Save
2) The non-typical direct way:
a) Open the default HTML skin in your favorite text editor (I recommend NotePad ++) - i.e.
DefaultHTML5.flskn
b) Scroll to the bottom (usually there) to the section, beginning with, "
<Toolbar"
c) Enter your Javascript here
d) Save
Here is my example:
Code: Select all
<Toolbar
EnableCustomLayout="true"
Buttons="Home|Print|ExpandAll|RemoveHighlight|Separator|TopicRatings|Separator|EditUserProfile|Filler|PreviousTopic|CurrentTopicIndex|NextTopic">
<Script>window.onload = function() {
$("#search-field").keyup(function (e) {
if (e.keyCode == 27) { $("#search-field").val(""); }
});
}
$(document).ready(function()
{$('head').append('<link rel="shortcut icon" href="Content/favicon.ico" type="image/x-icon" />');});</Script>
</Toolbar>
BTW, mine includes two scripts:
1) To clear search window with ESC key
2) Include a favicon (image in browser tab)
BTW, when you have published, a brand-shiny-new toolbar.js file is created in approximately, this path:
Output\~~ name ~~\~~ doc name ~~\Skins\Default\Scripts