I've inherited a complex project that we've just upgraded to 2008 Q2. And I've got a stubborn problem. And I'm very new to Telerik altogether so I'm fumbling a lot.
My page setup.aspx has a RadAjaxLoadingPanel. It loads many things under various circumstances; under one special circumstance it loads a custom control tabbed.ascx. Tabbed.ascx contains a RadTabStrip that shows various RadPageViews. One of those RadPageViews displays two RadEditors, but only some of the time (based on which radio button is selected).
Each of the RadEditors adds a slightly different custom dropdown, which is filled server-side. The purpose of these pulldowns is to enable inserting various kinds of text into the editor box. Previously this was enabled with these client-side javascript blocks:
<script type="text/javascript">
if (typeof(RadEditorCommandList) != "undefined")
{
RadEditorCommandList["Fields"] = function(commandName, editor, oTool)
{
oValue = oTool.GetSelectedValue();
editor.PasteHtml (oValue);
};
};
</script>
Now, the help file instructs me to use this sort of construction instead:
<telerik:RadEditor ... OnClientCommandExecuting="OnClientCommandExecuting" />
<script type="text/javascript">
function OnClientCommandExecuting(editor, args)
{
var name = args.get_name();
var val = args.get_value();
if (name == "Fields")
{
editor.pasteHtml(val);
//Cancel the further execution of the command as such a command does not exist in the editor command list
args.set_cancel(true);
}
}
</script>
This absolutely would not work, no matter where I put it in tabbed.ascx. It finally worked when I put it at the top of setup.aspx, which is annoying because setup.aspx really doesn't know anything about the editors and the script should stay close to what uses it. But anywhere in tabbed.ascx, Firefox's error console would report that OnClientCommandExecuting() wasn't defined. So I moved it to setup.aspx, and it seems to be working now.
However, there's still a problem. In IE, it just works. But in Firefox 3.0, it only works for a while. The first time you cause the page to display those editors, it works. But if you do anything that hides and then recreates the editors, they are frozen solid. You cannot type in them, and neither the custom pulldowns nor any other toolbar control does anything. If you leave the page completely and come back, you get another chance.
Like I said, in IE7, it just works, any number of times. In Firefox 3.0 it dies after the first time.
Any suggestions?
My page setup.aspx has a RadAjaxLoadingPanel. It loads many things under various circumstances; under one special circumstance it loads a custom control tabbed.ascx. Tabbed.ascx contains a RadTabStrip that shows various RadPageViews. One of those RadPageViews displays two RadEditors, but only some of the time (based on which radio button is selected).
Each of the RadEditors adds a slightly different custom dropdown, which is filled server-side. The purpose of these pulldowns is to enable inserting various kinds of text into the editor box. Previously this was enabled with these client-side javascript blocks:
<script type="text/javascript">
if (typeof(RadEditorCommandList) != "undefined")
{
RadEditorCommandList["Fields"] = function(commandName, editor, oTool)
{
oValue = oTool.GetSelectedValue();
editor.PasteHtml (oValue);
};
};
</script>
Now, the help file instructs me to use this sort of construction instead:
<telerik:RadEditor ... OnClientCommandExecuting="OnClientCommandExecuting" />
<script type="text/javascript">
function OnClientCommandExecuting(editor, args)
{
var name = args.get_name();
var val = args.get_value();
if (name == "Fields")
{
editor.pasteHtml(val);
//Cancel the further execution of the command as such a command does not exist in the editor command list
args.set_cancel(true);
}
}
</script>
This absolutely would not work, no matter where I put it in tabbed.ascx. It finally worked when I put it at the top of setup.aspx, which is annoying because setup.aspx really doesn't know anything about the editors and the script should stay close to what uses it. But anywhere in tabbed.ascx, Firefox's error console would report that OnClientCommandExecuting() wasn't defined. So I moved it to setup.aspx, and it seems to be working now.
However, there's still a problem. In IE, it just works. But in Firefox 3.0, it only works for a while. The first time you cause the page to display those editors, it works. But if you do anything that hides and then recreates the editors, they are frozen solid. You cannot type in them, and neither the custom pulldowns nor any other toolbar control does anything. If you leave the page completely and come back, you get another chance.
Like I said, in IE7, it just works, any number of times. In Firefox 3.0 it dies after the first time.
Any suggestions?