HTML is a static strictly markup language, so there's no way for it to do what you want. Heck, you can;t actually run HTML code, Browsers simply interpret it.
Perhaps you mean Javacript, though unless your script is trusted, and is running on IE, it won't work. And even on IE it will ask for permission to muck around with the users PC which is potentially very dangerous.
However I see no reason to do this unless its for an Intranet in an office or some such thing, in which case I'd use VBscript, and a trusted activex control.
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Behind the Web, Tips and Tricks for Web Development.
You are correct. I'm using javascript within an html css file; upon execution this file is designed to automatically save an .rtf document to the users desktop inside a trusted intranet site. XP allows this file to be saved to the all users desktop folder regardless of who logs in to the machine. Windows 7, however, changed the desktop path to c:\users\default\desktop (folder is hidden by default) and requires admin rights to write to it. I'm looking for a simple solution to perform this same "save to desktop" action from a Win7 machine.
Perhaps use the environment variables instead of direct paths and save to the particular user's desktop rather than the default desktop.
%USERPROFILE%\desktop\
or if you want to use the default desktop:
%DEFAULTUSERPROFILE%\desktop\
Though this is now very much outside the scope of this forum. Perhaps forum216 or forum1726 may offer better answers.
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Behind the Web, Tips and Tricks for Web Development.
Yea, give me a <br>! Since when can JavaScript create files on the user's hard-drive? I thought this was totally verboten. Please show code that can do this.
From my O'Reilly JavaScript (admittedly old at this point 4th edition, covers JavaScript 1.5) manual:
page 12
1.6.7 What JavaScript Can't Do
* For security reasons, client-side JavaScript does not allow the reading or writing of files. Obviously, you wouldn't want to allow an untrusted program from any random web site to run on your computer and rearrange your files!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.