2
votes

I have tried this solution: Open sitecore media library programmatically from asp.net button click

but this is not working for me. This gives a JavaScript error for .ascx file code mentioned in answer.

This statement: Sitecore.PageModes.ChromeManager.postRequest

I am using Sitecore 6.3, included sitecore.js file. But get the script error the PagesMode ChromeManager property caught for undefined.

Also tried to use

scForm.postRequest("", "", "", 'contentimage:open(id=FIELD1377303253)');

but this certainly wont issue the custom MediaBrowser command created for original solution.

1
A cursory glance at the referenced SO item makes me think it is designed to work inside the Sitecore shell. Can you provide information on what you are trying to create?Richard Hauer

1 Answers

0
votes

Try to use the Sitecore.Shell.Framework.Windows.RunApplication() function. You need to pass the Media Library itemId as parameter in the RunApplication() method.

You can get the Media Library ItemId in the Core Database at the following path: /sitecore/content/Applications/Content Editor/Applications/MediaLibraryForm

Thanks