We were using this code to set a value in the editor from a custom dialog:
We upgraded to the latest Rad tools and now get an error on "args.value.getAttribute is not a function".
What can we change to get that path value from the dialog?
Telerik.Web.UI.Editor.CommandList[
"BackgroundImage"
] =
function
(commandName, editor, commandArgs) {
var
argument = Telerik.Web.UI.Editor.CommandList._getLinkArgument(editor);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(argument,
"A"
, editor, commandName);
var
callbackFunction = Telerik.Web.UI.Editor.CommandList.getCallbackFunction(commandArgs,
function
(sender, args) {
if
(!args) {
//alert("No args!");
return
false
;
}
var
selectedItem = args.get_value();
var
path = args.value.getAttribute(
"src"
, 2);
var
style = editor.get_contentArea().style;
style.backgroundImage =
'url('
+ path +
')'
;
document.getElementById(
'<%=hdnBackgroundImage.ClientID %>'
).value = path;
});
editor.showDialog(
"backgroundImageManager"
, argument, callbackFunction);
return
false
;
};
We upgraded to the latest Rad tools and now get an error on "args.value.getAttribute is not a function".
What can we change to get that path value from the dialog?