zoukankan      html  css  js  c++  java
  • LaunchPickerTreeDialog is showing up blank in Sandbox Solution

    Hi Michael,

    Please use my code as the following in your content editor web part.

    <scriptsrc="/_layouts/1033/pickertreedialog.js"type="text/javascript"></script><scripttype="text/javascript">function launchPicker(){var listURLField = document.getElementById("URLTextBox");var defaultURL ="/";var url ="http://ghy/SitePages/Home.aspx";if(listURLField !=null&& listURLField !=''){ 
            url = listURLField.value.substring(0, listURLField.value.lastIndexOf('/'));}//call back function var callback =function(arr){if(arr ==null|| arr ==undefined|| arr[1]==null|| arr[2]==null)return; 
            lastSelectedListSmtPickerId = arr[0];var listURL ='';if(listURL.substring(listURL.length -1)!='/') listURL = listURL +'/';if(arr[1].charAt(0)=='/') arr[1]= arr[1].substring(1); 
            listURL = listURL + arr[1];if(listURL.substring(listURL.length -1)!='/') listURL = listURL +'/';if(arr[2].charAt(0)=='/') arr[2]= arr[2].substring(1); 
            listURL = listURL + arr[2];if(listURL !=''&& listURL !=null) 
                listURLField.value = listURL;var siteURL ='';if(siteURL.substring(listURL.length -1)!='/') siteURL = siteURL +'/';if(arr[1].charAt(0)=='/') arr[1]= arr[1].substring(1); 
            siteURL = siteURL + arr[1];if(siteURL.substring(siteURL.length -1)!='/') siteURL = siteURL +'/';if(arr[2].charAt(0)=='/') arr[2]= arr[2].substring(1); 
            siteURL = siteURL + arr[2];if(siteURL !=''&& siteURL !=null) 
                listURLField.value = siteURL;}LaunchPickerTreeDialog("CbqPickerSelectListTitle","CbqPickerSelectListTitle","","", url,null,"","","",0, callback);}</script><inputid="URLTextBox"type="text"size="100"maxlength="300"/><inputid="btnBrowse"onclick="launchPicker()"type="button"value="Copy Destination"/>

    Thanks,

    Jack


    Jack Gao
    TechNet Community Support

  • 相关阅读:
    【题解】P3565 [POI2014]HOT-Hotels
    【学习笔记】$gcd$ 与扩展 $gcd$
    【题解】P3810 【模板】三维偏序(陌上花开)- $CDQ$
    【题解】P3374 【模板】树状数组 1
    【考试总结】2020 上半年 汇总
    【题解】P4570 [BJWC2011]元素
    【题解】P2480 [SDOI2010]古代猪文
    【考试总结】小奇模拟赛
    【题解】P3349 [ZJOI2016]小星星
    搞懂ZooKeeper的Watcher之源码分析及特性总结
  • 原文地址:https://www.cnblogs.com/ahghy/p/3134413.html
Copyright © 2011-2022 走看看