I'm using a custom config file ('config.js') to add in a custom button on the toolbar. I wrote all my code originally in the config file and everything worked fine. Here's the working code.
Here's the problem. I want to store the code for 'my_button' in an external .js file. Does anyone know how i can load up that external .js file from inside the config.js i have above ?
// BEGIN : CODE I WANT TO PUT IN A .JS file and link to externally
// -----------------------------------------------------------------------
var my_button = function(){}
my_button.prototype =
{
Name : 'my_button',
Execute : function() {alert( 'execute my_button' );},
GetState : function() {return FCK_TRISTATE_OFF;}
};
// END : -----------------------------------------------------------------------------
var oFindItem = new FCKToolbarButton( 'cmd_my_button','My Button') ;
oFindItem.IconPath = '/foo/icon.jpg' ;
// Register the related commands.
FCKCommands.RegisterCommand( 'cmd_insert_break' , new my_button() ) ;
FCKToolbarItems.RegisterItem( 'btn_insert_break', oFindItem ) ;
FCKConfig.ToolbarSets["Default"] = [ ['btn_my_button'] ];
Here's the problem. I want to store the code for 'my_button' in an external .js file. Does anyone know how i can load up that external .js file from inside the config.js i have above ?
