By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,332 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

javascript popup view by details

P: n/a
I have a very simple javascript popup that opens to
a drive folder, e.g.

c:\test

which is called as such:

<A HREF="javascript:popUp('C:/test')">Test Folder</A>
This displays the contents of the c:\temp folder
but defaults to a view of "large icons." Is there
a way to make it default to a view of "details?"
Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 15 Sep 2004 05:37:18 -0700, Tone wrote:
<A HREF="javascript:popUp('C:/test')">Test Folder</A> ... This displays the contents of the c:\temp folder
but defaults to a view of "large icons." Is there
a way to make it default to a view of "details?"


Since only IE (of IE/Moz/Opera) does that,
I suggest you ask the manufacturer of that
OS component.

[ And I doubt the solution (if there is one)
has anything to do with Javascript. ]

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
Jul 23 '05 #2

P: n/a
Tone wrote:

<A HREF="javascript:popUp('C:/test')">Test Folder</A>


What Andrew said: talk to Microsoft. Other browsers show a
standard detail view.

Here's another way of doing what you want that works in other browsers:

<script type="text/javascript">
function listFiles(link) {
var fileWindow = window.open(link,'aWindow','');
}
</script>
<form><input type="button" value="click"
onclick="listFiles('file:///c:/temp');">
</form>

Jul 23 '05 #3

P: n/a
Basically, the problem was that windows.open() in the
javascript didn't allow me the control I needed to
specify the appropriate command line parameters to
Windows Explorer. Perhaps there is a way, but I
didn't find it.

So, I found a solution that doesn't use windows.open().

Here is the code snippet:
<SCRIPT LANGUAGE="JavaScript">
<!--

function popUp(URL) {

var objShell = new ActiveXObject ( "Shell.Application" );
objShell.ShellExecute ( "explorer.exe", '/n,'+URL, "", "open", 1 );
}
// End -->
</script>


to*******@yahoo.com (Tone) wrote in message news:<6a**************************@posting.google. com>...
I have a very simple javascript popup that opens to
a drive folder, e.g.

c:\test

which is called as such:

<A HREF="javascript:popUp('C:/test')">Test Folder</A>
This displays the contents of the c:\temp folder
but defaults to a view of "large icons." Is there
a way to make it default to a view of "details?"

Jul 23 '05 #4

P: n/a
Hmmm . . . somehow this message got put on the wrong
thread. Trying again . . . .

Basically, the problem was that windows.open() in the
javascript didn't allow me the control I needed to
specify the appropriate command line parameters to
Windows Explorer. Perhaps there is a way, but I
didn't find it.

So, I found a solution that doesn't use windows.open().

Here is the code snippet:
<SCRIPT LANGUAGE="JavaScript">
<!--

function popUp(URL) {

var objShell = new ActiveXObject ( "Shell.Application" );
objShell.ShellExecute ( "explorer.exe", '/n,'+URL, "", "open", 1 );
}
// End -->
</script>
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.