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;
- function fnFileToDosyaFile(){
- var sFileUrl='';
- var sHostName = location.protocol +'//'+ location.host; //define currrent host name
- var editdoc = edDosyaFile.GetDocument();
- var links = editdoc.getElementsByTagName("a");
- if(links.length>0&&links[links.length-1].href!=""){
- sFileUrl = links[links.length-1].href;
- sFileUrl = sFileUrl.replace(sHostName, '');
- document.getElementById("DOSYA").value = sFileUrl;
- } else{
- setTimeout(fnFileToDosyaFile,500);
- }
- }