Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iframe

Status
Not open for further replies.

NNNNN

MIS
Dec 2, 2002
90
0
0
GB
The following code will display the contents of a local folder in a web browser, however, it defaults to icons regardless of the default XP folder settings. I want to view the local folder as either list or details in the browser by default. Or alternatively as an ftp style list.

Opening the page in IE displays icons in the iframe, but opening it in firefox displays an ftp style list. I want to use IE but control the folder view.
Any ideas how I can do this please?

Code:
<html>
<a href="file:///C:/iframetest/"
onclick="var f=document.getElementById('anotherFrameID');
try { f.src=this.href; f.style.display='block'; }
catch(e) { f.style.display='none'; alert(e.description?e.description:e.toString()); }
return false;">view local filesystem...</a>
<iframe src="" id="anotherFrameID"
style="display:none;background:#fff;width:100%;height:500px"></iframe>
</html>

Many thanks
 
It's relative to what the folder view is set to.

You are viewing system stuff in a broswer and will also run into loads of security popups because of it.

But the simplest way to change it is right-click on the folder view, ok the warning, slet view and then your desired view.

Remember, it's not up to you how peoples folders should be displayed , it's up to the user and their folder view setings!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top