Announcement

Collapse
No announcement yet.

href local files using file: on all browsers?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • href local files using file: on all browsers?

    Does <a href='file: work with all browsers?
    My system depends upon this working with all browsers.
    Working with a browser within the app eliminates the need for many dialogs like open file by rendering lists within it. A great way to program.
    Code:
    REM Fill browser with directory listing
    sTemp = "<html><body>
    For x = 1 to ubound(s(x))
        sTemp = sTemp + "<a href =" + Chr$(34) + "file:\smtp\htm\" + s(x) + chr$(34) + ">" + s(x) + "<br> </a>"
    Next
    sTemp = sTemp + </body></html>"
    Last edited by Mike Doty; 31 Mar 2008, 06:56 PM. Reason: Goofed
    CMD shortcut to open any location:
    %windir%\system32\cmd.exe /k " cd\ & x: & cd x:\xxxx
    Change to run as administrator
    How long is an idea? Write it down.

  • #2
    I would think that all browsers would support the file scheme (at least the major ones worth mentioning), but how they handle it will probably be different. For example, if you hand FireFox a URL like "file:///c:/" then it will show you is a directory listing of the root of the C: drive. But if you do that in Internet Explorer, you'll get a warning dialog and it will actually open up Windows Explorer. If you pass the name of an actual file, such as "file:///c:/users/mike/documents/filename.ext" then it will just treat it as though you specified "c:\users\mike\documents\filename.ext"
    Mike Stefanik
    sockettools.com

    Comment


    • #3
      Thanks, Mike.
      CMD shortcut to open any location:
      %windir%\system32\cmd.exe /k " cd\ & x: & cd x:\xxxx
      Change to run as administrator
      How long is an idea? Write it down.

      Comment


      • #4
        Some AV packages might also not be happy with a process that opens a browser which opens a local file ...

        Comment

        Working...
        X