开发者

Getting the Folder Path via the Browser using Internet Explorer

I would like to create a folder selector for my application which will only run on Internet Explorer Browsers (IE6+).

I would like to get the full folder path a user wishes to use via a HTML browse button or similar and then pass this to my server side application which is written in PHP! This can not be 开发者_开发百科done via JavaScript for security reasons so I am looking for any other alternative that will work.

I had implemented a solution using a Java Applet but this did not work out as it didn't work on IE6, plus the browser security is locked down where I am deploying this app, meaning I am unlikely to get away with an applet.

The current solution is getting the user to paste in the folder location into a textfiel, this isn't acceptable any more.

Any implementation advice welcome!

Thanks all


If your app is IE only you can create a simple ActiveX Control with only one method:

 HRESULT BrowseForFolder([out] BSTR folderName);

ATL Wizard will give you major portion of code.

But I would consider using flash for this:

  1. It is more widely used then Java (I think so).

  2. ActiveX is strongly depends on browser's security options and more annoying to install.

  3. Your task is rather small, so it can be implemented without deep skills, if you not familiar with flash
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜