Jump to content

Browse folder


Recommended Posts

Hi . I am browse the folder using following code snippet function fnShellBrowseForFolderJ(val) { var str=val var objShell = new ActiveXObject("Shell.Application"); var objFolder = new Object; var objParentFolder; var objFolderItem; var strFolderName; objFolder = objShell.BrowseForFolder(0, "Test", 0, "C:\\"); if (objFolder != null) { // Add code here. objParentFolder = objFolder.ParentFolder; strFolderName = objFolder.Title; objFolderItem = objParentFolder.ParseName(strFolderName); if (val=="input") { var txt=document.getElementById('<%=txtinput.clientId%>') txt.value = objFolderItem.Path; } if (val=="output") { var txt=document.getElementById('<%=txtOutput.clientId%>') txt.value = objFolderItem.Path; txt.value = objFolderItem.Path; } } } But , i throws an javascript error "Permission denied". How do i solve this problem?Thanks,Prashant N

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...