function
triggerdialog(dialog){
var editor = $find("<%=RadEditor1.ClientID%>");
editor.fire(dialog);
}
I created a custom .ascx dialog to upload and convert videos. I want to use the same triggerdialog function to open my new dialog window.
However, when I pass in my custom dialog name it give me an error and will not open.
How can this be accomplished?
I looked at showExternalDialog but it seems that this is used for aspx files. I have an ascx file.
code below:
<
script type="text/javascript">
Telerik.Web.UI.Editor.CommandList[
"VideoUpload"] = function(commandName, editor, args)
{
args.destid = document.getElementById(
'HiddenFieldDestId').value;
args.username = document.getElementById(
'HiddenFieldUserName').value;
args.HiddenPageID = document.getElementById(
'HiddenPageID').value;
editor.get_dialogOpener().set_additionalQueryString(
"&username=" + args.username + "&destid=" + args.destid);
var myCallbackFunction = function(sender, args)
{
var insertvideo = '<object type="application/x-shockwave-flash" data="FlowPlayerWhite.swf"'
+
'width="320" height="240">'
+
'<param name="allowScriptAccess" value="sameDomain" />'
+
'<param name="movie" value="FlowPlayerWhite.swf" />'
+
'<param name="quality" value="high" />'
+
'<param name="scale" value="Scale" />'
+
'<param name="wmode" value="transparent" />'
+
'<param name="flashvars" value="config={videoFile: ' + args.video + ' , showMenu: false , loop: false , showLoopButton: false}" />'
+
'</object>';
editor.pasteHtml(insertvideo);
}
editor.showDialog(
"VideoUpload", args, myCallbackFunction);
};
//]]>
</script>
Serverside_____
Dim editHTMLDefinition As New DialogDefinition("./VideoUpload.ascx", New DialogParameters())
editHTMLDefinition.Modal =
True
editHTMLDefinition.VisibleTitlebar = True
editHTMLDefinition.VisibleStatusbar = True
editHTMLDefinition.Width = Unit.Pixel(570)
editHTMLDefinition.Height = Unit.Pixel(380)
editHTMLDefinition.VisibleStatusbar =
False
RadEditor1.AddDialogDefinition("VideoUpload", editHTMLDefinition)