473,326 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Can I write to file in JavaScript?

.
Yes, now you can with LocaWapp (and async Ajax):
http://daviderognoni.blogspot.com/?locawapp
[JavaScript]

jsFileWrite("testJsFile.txt","This is a test.");

alert(jsFileRead("testJsFile.txt"));

Jun 16 '06 #1
10 2608
On Fri, 16 Jun 2006 14:16:07 -0700, . wrote:
Yes, now you can with LocaWapp (and async Ajax):
http://daviderognoni.blogspot.com/?locawapp


Which isn't javascript... so, therefore no, you can't.

--
The USA Patriot Act is the most unpatriotic act in American history.
Feingold-Obama '08 - Because the Constitution isn't history,
It's the law.

Jun 16 '06 #2
Hi,

Ivan Marsh wrote:
On Fri, 16 Jun 2006 14:16:07 -0700, . wrote:

Yes, now you can with LocaWapp (and async Ajax):
http://daviderognoni.blogspot.com/?locawapp

Which isn't javascript... so, therefore no, you can't.


Actually, with appropriate permissions, you can. I can publish the code
for Netscape 4.*, Mozilla (Netscape 6, 7, Firefox) and for IE if needed.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 16 '06 #3
Laurent Bugnion said the following on 6/16/2006 6:00 PM:
Hi,

Ivan Marsh wrote:
On Fri, 16 Jun 2006 14:16:07 -0700, . wrote:

Yes, now you can with LocaWapp (and async Ajax):
http://daviderognoni.blogspot.com/?locawapp

Which isn't javascript... so, therefore no, you can't.


Actually, with appropriate permissions, you can. I can publish the code
for Netscape 4.*, Mozilla (Netscape 6, 7, Firefox) and for IE if needed.


Does your code also document the pitfalls with trying to write to the
File System from an Internet page?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 17 '06 #4
Hi,

Randy Webb wrote:
Laurent Bugnion said the following on 6/16/2006 6:00 PM:
Actually, with appropriate permissions, you can. I can publish the
code for Netscape 4.*, Mozilla (Netscape 6, 7, Firefox) and for IE if
needed.

Does your code also document the pitfalls with trying to write to the
File System from an Internet page?


It's not a demo or a tutorial, only code that I use under certain
circumstances (i.e. I use it only in pages running in the file:
protocol). It just bugged me to read that JavaScript cannot write to
files, which is not correct.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 17 '06 #5
.
Hi,
"... to write to the File System from an Internet page?"

Yes, because I want:
LWA - LocaWapp - localhost web applications

Do you like new logo?
http://daviderognoni.blogspot.com/?locawapp
Laurent Bugnion ha scritto:
Hi,

Randy Webb wrote:
Laurent Bugnion said the following on 6/16/2006 6:00 PM:
Actually, with appropriate permissions, you can. I can publish the
code for Netscape 4.*, Mozilla (Netscape 6, 7, Firefox) and for IE if
needed.

Does your code also document the pitfalls with trying to write to the
File System from an Internet page?


It's not a demo or a tutorial, only code that I use under certain
circumstances (i.e. I use it only in pages running in the file:
protocol). It just bugged me to read that JavaScript cannot write to
files, which is not correct.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch


Jun 18 '06 #6
> Actually, with appropriate permissions, you can. I can publish the code
for Netscape 4.*, Mozilla (Netscape 6, 7, Firefox) and for IE if needed.


Okay I am interested in a copy. Can you send me a link ?

Aaron
Jun 19 '06 #7
Hi,

Aaron Gray wrote:
Actually, with appropriate permissions, you can. I can publish the code
for Netscape 4.*, Mozilla (Netscape 6, 7, Firefox) and for IE if needed.

Okay I am interested in a copy. Can you send me a link ?

Aaron


I posted a demo on my website
http://www.galasoft-lb.ch/myjavascript/CExplorer

All comments welcomed.

Greetings,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 19 '06 #8
Hi Randy,

Randy Webb wrote:
Does your code also document the pitfalls with trying to write to the
File System from an Internet page?


I posted a demo on my website
http://www.galasoft-lb.ch/myjavascript/CExplorer

I'd be interested to hear what you think of it in order to improve the
description of it.

Note: It's basically just a proof of concept.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 19 '06 #9
Laurent Bugnion said the following on 6/19/2006 7:15 AM:
Hi Randy,

Randy Webb wrote:
Does your code also document the pitfalls with trying to write to the
File System from an Internet page?
I posted a demo on my website
http://www.galasoft-lb.ch/myjavascript/CExplorer

I'd be interested to hear what you think of it in order to improve the
description of it.


Even with a File>Save As and executing it locally IE6 throws an
automation error. I didn't look to find it yet, but I will try later.
Note: It's basically just a proof of concept.


The concept is solid, its implementation is what is difficult with the
state of security settings.

The problem isn't JS' lack of ability to save files locally, it is the
lack of privileges that prevents it from being reliable on an internet
website.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 19 '06 #10
Hi,

Randy Webb wrote:

Even with a File>Save As and executing it locally IE6 throws an
automation error. I didn't look to find it yet, but I will try later.


Try saving the demo zip file at
http://www.galasoft-lb.ch/myjavascri...lorer.demo.zip

I tested that on a few different PCs without errors.
Note: It's basically just a proof of concept.


The concept is solid, its implementation is what is difficult with the
state of security settings.

The problem isn't JS' lack of ability to save files locally, it is the
lack of privileges that prevents it from being reliable on an internet
website.


That's what I mean with "Many people assume that client-side JavaScript
cannot perform file-system operations on the client computer. Actually,
the objects needed are often found in the browsers, and the rest is only
a matter of compatibility (the way IE saves files is very different from
the way Firefox saves files...) and of permissions."

Maybe I should underline better the "permissions" thing.

Note also "I usually use these methods either in HTA applications
(running locally, granted extended privileges by IE), or in the "file:"
protocol. This is what they have been designed for."

Thanks for your feedback.

Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 20 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob Murdoch | last post by:
I have a situation where I call a COM object from ASP that is supposed to create a file. On occasion, especially during development, the output of the COM function is an error string rather than...
2
by: Mark Szlazak | last post by:
All files that I will be referring to are in the same file folder. I need my javascipt file to write or save the contents of a textarea to other local files. This is for local use only on one...
8
by: Ben | last post by:
Hi all, Just wondering how to write (using document.write) to a table cell. I have table with 3 rows and 3 colums. I want to write from within the Javascript to say third column of a first row....
12
by: Radek Maciaszek | last post by:
Hi It's very interesting problem. I couldn't even find any inforamtion about it on the google. I think that the best way of explain will be this simple example: <html> <body> <script...
1
by: Merennulli | last post by:
Ok, did some seriously ugly meddling with javascript so that my user can do a level of formatting which gets shunted into a hidden input field as raw HTML code. That code is then passed back and...
3
by: Billy Smith | last post by:
I'm trying to write a little utility that will write some binary data to a file via a javascript and Windows Script Host under Windows XP. The only way to do this that I can find is to convert...
1
by: Iulian Ilea | last post by:
Hello, Let's say that I have a very big string to write into a file. If I concatenate strings and write the string into file at the end of processing than memory use will increase exponential....
8
by: johnsonlau | last post by:
When I use document.write to replace the comment of a frame, I found that the page was always showing as loading in Firefox (2.0.0.2). But it seems that it is OK in IE6. Could someone help me...
7
by: sj071 | last post by:
I'm little more than a novice when it comes to javascript, and this particular problem has been driving me mad for the past few days... The Problem: I have a javascript file that uses...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.