Connecting Tech Pros Worldwide Help | Site Map

can I write to a local .txt File wit javascribt?

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 20th, 2005, 12:00 PM
Rickli Hansueli
Guest
 
Posts: n/a
Default can I write to a local .txt File wit javascribt?

javascript:
can I write to a local .txt File
as exaple:

open() ....writel(() ...close()..... ....save as ... c:\test.txt
thank you if you have an idea
Hansueli



  #2  
Old July 20th, 2005, 12:00 PM
Ivan Marsh
Guest
 
Posts: n/a
Default Re: can I write to a local .txt File wit javascribt?

On Thu, 20 Nov 2003 18:46:56 +0100, Rickli Hansueli wrote:
[color=blue]
> javascript:
> can I write to a local .txt File
> as exaple:
>
> open() ....writel(() ...close()..... ....save as ... c:\test.txt thank
> you if you have an idea
> Hansueli[/color]

You shouldn't be able to from what I know.
That would violate the browser security.


--
i.m.
The USA Patriot Act is the most unpatriotic act in American history.

  #3  
Old July 20th, 2005, 12:00 PM
Lasse Reichstein Nielsen
Guest
 
Posts: n/a
Default Re: can I write to a local .txt File wit javascribt?

"Rickli Hansueli" <rickli@rickli.com> writes:
[color=blue]
> javascript:
> can I write to a local .txt File[/color]

No, not in the standard browser security environment.

/L
--
Lasse Reichstein Nielsen - lrn@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
  #4  
Old July 20th, 2005, 12:00 PM
Douglas Crockford
Guest
 
Posts: n/a
Default Re: can I write to a local .txt File wit javascribt?

> can I write to a local .txt File

Perhaps you meant "JavaScript"? Yes, in the right runtime environment.
Here are two environments that can:

Sash: http://sash.alphaworks.ibm.com/
WSH:
http://msdn.microsoft.com/library/de...ScriptHost.asp

The webbrowser environment does not ordinarily permit this.

http://www.crockford.com/#javascript

  #5  
Old July 20th, 2005, 12:00 PM
Vjekoslav Begovic
Guest
 
Posts: n/a
Default Re: can I write to a local .txt File wit javascribt?

"Rickli Hansueli" <rickli@rickli.com> wrote in message
news:3fbcfdfd$1_1@news.bluewin.ch...[color=blue]
> javascript:
> can I write to a local .txt File
> as exaple:
>
> open() ....writel(() ...close()..... ....save as ... c:\test.txt[/color]

In the standard web environment no, but on your local PC you can, e.g.

var fso = new ActiveXObject("Scripting.FileSystemObject");
var myfile = fso.CreateTextFile("c:\\myfile.txt", true);
myfile.WriteLine("Some test.");
myfile.Close();

Search Google for FileSystemObject for more information.

If you have some antivirus program, it may stop the script.

Vjekoslav


  #6  
Old July 20th, 2005, 12:01 PM
Mark Szlazak
Guest
 
Posts: n/a
Default Re: can I write to a local .txt File wit javascribt?

A previous post shows an IE only method, if you want to do the same
thing in Mozilla or Netscape 7 then have a look at this tip:

http://www.faqts.com/knowledge_base/...d/23360/fid/53







*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.