Re: How to get SiteRelative link from FileManager Editor

  •  12-21-2009, 7:46 PM

    Re: How to get SiteRelative link from FileManager Editor

    Hi Adam,
     
    Your solution is works fine. 
     
    But In the meantime, I've created my own solution :)
     
     I changed my JS function code as follows and works fine too;
    1. function fnFileToDosyaFile(){      
    2.     var sFileUrl='';  
    3.     var sHostName = location.protocol +'//'+ location.host; //define currrent host name  
    4.     var editdoc = edDosyaFile.GetDocument();      
    5.     var links = editdoc.getElementsByTagName("a");      
    6.     if(links.length>0&&links[links.length-1].href!=""){      
    7.         sFileUrl = links[links.length-1].href;  
    8.         sFileUrl = sFileUrl.replace(sHostName, ''); //clear hostname from Fullpath  
    9.         document.getElementById("DOSYA").value = sFileUrl;      
    10.     } else{      
    11.         setTimeout(fnFileToDosyaFile,500);      
    12.     }      
    13. }   
View Complete Thread