I'm making a GUI Extension.
Adding new context menu to SDL Web 8, and open ASP.NET as pop up page by clicking the context menu.I need to pass selected folder's TCMURI to the ASP.NET page, so I use $popupManager.createExternalContentPopup
function and pass folder's TCMURI as a parameter.
But on Internet Explorer and Google Chrome, it failed to get folder's TCMURI from the ASP.NET page(only Firefox is no problem).
So I made following test program(GUI Extension) and examined whether passing value to pop up page is possible.
GUI Extension's JavaScript
Type.registerNamespace("ImageUploader.UI.Editor.Commands");
ImageUploader.UI.Editor.Commands.ImageUploader = function Commands$ImageUploader() {
Tridion.OO.enableInterface(this, "ImageUploader.UI.Editor.Commands.ImageUploader");
this.addInterface("Tridion.Web.UI.Editors.Base.Commands.CommandBase", ["ImageUploader"]);
};
ImageUploader.UI.Editor.Commands.ImageUploader.prototype._isAvailable = function DealerImport$_isAvailable(selection) {
return true;
};
ImageUploader.UI.Editor.Commands.ImageUploader.prototype._isEnabled = function DealerImport$_isEnabled(selection) {
return true;
};
ImageUploader.UI.Editor.Commands.ImageUploader.prototype._execute = function ImageUploadert(selection) {
$popupManager.createExternalContentPopup("/WebUI/Editors/BinaryUploadExtension/test.html", "width=820px,height=550px,resizable=1,status=1", {para:"test value"}).open();
};
Pop up page(test.html)
<html>
<head>
</head>
<body>
<script>
alert("window.dialogArguments.para:" + window.dialogArguments.para);
</script>
</body>
</html>
Result is following.
- Internet Explorer:NG
- Google Chrome:NG
- Firefox:OK
(When NG, dialogArguments is "undifined")
"createExternalContentPopup" is used in SDL Web 8's JavaScript, so I believe it works.
But SDL Web 8 pass folder's TCMURI by URL parameter, like this.
/WebUI/item.aspx?tcm=16#type=tcm:16&org=tcm:15-7-2&pub=tcm:0-15-1&sub=0
Is it possible to pass value to pop up page by "createExternalContentPopup" function on any browser?
Which does SDL Web 8 get folder's TCMURI from URL parameter, or JavaScript parameter(dialogArguments)?