Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

LaunchPickerTreeDialog is showing up blank in Sandbox Solution

$
0
0

I'm trying to create a page where users can choose a file from a file selector and then choose a destination through a different file selector and it will copy the document between libraries. I found 'LaunchPickerTreeDialog' and lots of info on how to build one, but when I follow the same instructions, my dialog box pops up blank. My page is a site page getting deployed through a sandbox solution feature. I wonder if I need to do this as an application page being deployed through a farm solution instead? Here is the relevant code:

On my aspx page:

<script type="text/javascript" src="/_layouts/1033/pickertreedialog.js"></script><script type="text/javascript" src="CopyTo.js"></script>

Copy From: <input type="text" id="CopyFrom" maxlength="300" size="100" ><br>
Copy To: <input type="text" id="txtWebUrl" maxlength="300" size="100" ><input id="btnBrowse" type="button" value="Copy Destination" onclick="LaunchSitePicker()"/>

and here is the LaunchSitePicker function in CopyTo.js

function LaunchSitePicker() {
    var lastSelectedSiteSmtPickerId = null;
    if (!document.getElementById) return;
    var siteTextBox = document.getElementById("txtWebUrl");
    if (siteTextBox == null) return;
    var serverUrl = encodeURIComponent(this.site.get_url());
    var callback = function(results){
        if (results == null || results[1] == null) return;
        lastSelectedSiteSmtPickerId = results[0];
        siteTextBox.value = results[1];
    }
    LaunchPickerTreeDialog('CbqPickerSelectSiteTitle','CbqPickerSelectSiteText','listsOnly','',serverUrl, lastSelectedSiteSmtPickerId,'','','/_layouts/images/smt_icon.gif','',callback);
}

I don't get any errors or anything. It just pops up a blank web dialog box that says "-- Webpage Dialog" as the title and nothing else.


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>