Once you create a Custom Combo Box to place is the menu.
Is there a way to call the plugin to update the combo box without refreshing the page.
I'd like to perform a javascript call to the plugin and rebuild the contents of the drop down.
Anyone know how to do this?
Is there a way to call the plugin to update the combo box without refreshing the page.
I'd like to perform a javascript call to the plugin and rebuild the contents of the drop down.
Anyone know how to do this?

Re: FCKToolbarSpecialCombo Question
1) Create a prototype function that will load up an object with the values you'll want to display
FCKToolbarXCombo.prototype.GetXData = function() { var xdata = {} ; while (moredata) { // Need some logic here... xdata[ shortname ] = htmlcontents ; } return fields ; }2) Create your CreateItems function...
FCKToolbarXCombo.prototype.CreateItems = function( targetSpecialCombo ) { // Important: Set the OnBeforeClick function to your custom reload function. // Do it in CreateItems, which only gets called at toolbar creation. targetSpecialCombo.OnBeforeClick = this.XCombo_OnBeforeClick ; var xdata = targetSpecialCombo.GetXData() ; for ( var shortname in xdata ) { var contents = xdata [ shortname ] ; var caption = shortname ; var item = targetSpecialCombo.AddItem( shortname, caption ) ; item.Name = shortname ; item.Definition = contents ; } }3) Create the OnBeforeClick function... (This can be very similar to the CreateItems function)
FCKToolbarXCombo.prototype.XCombo_OnBeforeClick = function( targetSpecialCombo ) { targetSpecialCombo.DeselectAll() ; // Deselect and clear the current combo box of items targetSpecialCombo.ClearItems() ; var xdata = targetSpecialCombo.GetXData() ; // Reload your data for ( var shortname in xdata ) { var contents = xdata [ shortname ] ; var caption = shortname ; var item = targetSpecialCombo.AddItem( shortname, caption ) ; item.Name = shortname ; item.Definition = contents ; } }And if it helps... On Execute, I am inserting the HTML stored in the selected comboItem.Definition.
Re: FCKToolbarSpecialCombo Question
My plugin was named monthCombo with a monthComboToolbar which is registered
as FCKToolbarItems
Issuing I'm having is when I create monthCombo.prototype.GetXData = function()
and attempt to call this using
var xdata = targetSpecialCombo.GetXData() ; from the CreateItems call i get that
it can't find tagetSpecialCombo which you've defined as a input parameter on CreateItems and OnBeforeClick
do you know how come i'm getting this error?
Re: FCKToolbarSpecialCombo Question
If my code weren't so application-specific, I'd post my entire plugin to see if you could spot any differences. But it's otherwise useless material, which is why I cut-and-pasted (and edited down to a prototype) a more limited set...
Re: FCKToolbarSpecialCombo Question