Re: Allowing clients to open files on their own system
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Allowing clients to open files on their own system

From: ASM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid>
Date: Thu Jul 28 2005 - 04:33:00 CEST

Ian Rastall wrote:
> I've got a small search page at http://www.sundry.ws/search.html and
> I would like to add a section that allows me to open files on my
> computer, instead of having to go to File > Open. It's just slightly
> easier that way.

you have to open a same file in each browser and to see
what they give as url (location bar)

then do the same with <input file
  -> onchange="alert(this.value)"

compare and make JS for corrections according to each browser

i.e. on my Mac url given by input is :
file://hard_drive/folder/file.htm
or
file:///hard_drive/folder/file.htm
or
hard_drive/folder/file.htm

and rigth url in location.href
would be : file://hard_drive/folder/file.htm

-- 
Stephane Moriaux et son [moins] vieux Mac
Received on Tue Oct 18 03:02:41 2005