access unc path with window.location redirect

Posted on 2005-05-10
Last Modified: 2008-02-26
If I go into IE I can type a UNC path (\\kevin2004\c) in the address bar and it will pull up the folders on my local hard drive.
I want to do the same thing using the window.location redirect javascript but the syntaxn doesn't seem to be working.
Any thoughts?
Question by:kevinvw1
    LVL 9

    Assisted Solution

    Hi kevinvw1,

     Yes IE us embeded into the Operating system and will switch to Normal Windows Explorer on a UNC. Javascript has already defined the browser as a webpage and will not be able to use UNC's.

    LVL 11

    Accepted Solution

    put file://kevin2004/c

    at the beinging of your unc path otherwise it will default to http://kevin2004/c


    Author Comment

    andrew, I didn't quite clarify, I am concatenating the path.  Also, this is running inside an non-web application (GoldMine CRM).
    They have an embedded browser view that allows you to pass field info from the application into the embedded IE browser.

    Currently I have the following -

    window.location = "<<&Key5>>"
    Where &Key5 represents a text field in the goldmine application.
    If the Key5 field contains file://kevin2004/c/clients/1234
    everything works perfectly.
    What I need though, is to hard code the "file://kevin2004/c/clients/" portion and
    Key5 field will contain only the final destination folder (1234).


    Author Comment

    One more thing, GoldMine automatically handles the replacing of the "&amp:Key5" with the appropriate data that is being stored in the Key5 field.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Uploading files to the web server has become common part of almost any kind of web application. People use different technologies to solve this, but regardless of the technology used, it is always useful to have some kind of progress indicator shown…
    This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
    Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now