javascript popup view by details

Discussion in 'Javascript' started by Tone, Sep 15, 2004.

  1. Tone

    Tone Guest

    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?"
    Tone, Sep 15, 2004
    #1
    1. Advertising

  2. Tone

    RobG Guest

    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>
    RobG, Sep 16, 2004
    #2
    1. Advertising

  3. Tone

    Tone Guest

    Solution found

    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>




    (Tone) wrote in message news:<>...
    > 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?"
    Tone, Sep 16, 2004
    #3
  4. Tone

    Tone Guest

    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>
    Tone, Sep 16, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Phillip Vong
    Replies:
    1
    Views:
    343
    Paul Zanbaka
    Feb 24, 2006
  2. =?Utf-8?B?Sm9l?=

    Show Details/Hide Details link button

    =?Utf-8?B?Sm9l?=, Mar 13, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    894
    dkode
    Mar 13, 2006
  3. jonefer

    Details Window (Popup)

    jonefer, Apr 4, 2008, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    732
    jonefer
    Apr 4, 2008
  4. Parthiv Joshi
    Replies:
    1
    Views:
    641
    Samuel L Matzen
    Jul 6, 2004
  5. Jens Peter Hansen
    Replies:
    7
    Views:
    498
    Randy Webb
    Jun 19, 2004
Loading...

Share This Page