473,386 Members | 1,621 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,386 software developers and data experts.

Any possible way to write a text document ?

I know that there is probably no way to do this but, I would really like to
be able do this, so ...:)

Aaron
Nov 10 '05 #1
8 1173
Aaron Gray said the following on 11/10/2005 4:16 PM:
I know that there is probably no way to do this but,
To do what?
I would really like to be able do this, so ...:)


That depends, directly, on what you would "really like to be able to do".

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 10 '05 #2
>> I know that there is probably no way to do this but,

To do what?
I would really like to be able do this, so ...:)


That depends, directly, on what you would "really like to be able to do".


Sorry Randy, forgot to include question in message.

Is there any possible way to write a text file from JavaScript to the local
machine ?

Aaron
Nov 10 '05 #3
Aaron Gray said the following on 11/10/2005 4:56 PM:
I know that there is probably no way to do this but,


To do what?

I would really like to be able do this, so ...:)


That depends, directly, on what you would "really like to be able to do".

Sorry Randy, forgot to include question in message.

Is there any possible way to write a text file from JavaScript to the local
machine ?


Not in any kind of default security environment. IE has the ActiveX
FileSystemObject that can allow you to write files (providing it is
given access). Mozilla may have a comparable counterpart but I do not know.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 10 '05 #4

Randy Webb wrote:

[snip]
Mozilla may have a comparable counterpart but I do not know.


XPCOM and XPConnect

Examples are given on this page:-

http://www.captain.at/programming/xul/

Regards

Julian

Nov 10 '05 #5
>> Is there any possible way to write a text file from JavaScript to the
local machine ?


Not in any kind of default security environment. IE has the ActiveX
FileSystemObject that can allow you to write files (providing it is given
access).


Thanks, I'll look in to that when I get some time.

Aaron
Nov 10 '05 #6
>>Mozilla may have a comparable counterpart but I do not know.

XPCOM and XPConnect

Examples are given on this page:-

http://www.captain.at/programming/xul/


Great. Thanks,

Aaron
Nov 10 '05 #7
JRS: In article <3t************@individual.net>, dated Thu, 10 Nov 2005
21:56:29, seen in news:comp.lang.javascript, Aaron Gray
<an********@gmail.com> posted :
Is there any possible way to write a text file from JavaScript to the local
machine ?

Here the default assumption is Web use.

For that, write the data to a textarea and ask the user to copy'n'paste
it to where he wants it; or write it to a new window and ask him to use
File, Save As or equivalent. First, though, check that they work for an
arbitrary user and a page from a remote server.

To do that sort of thing in javascript run locally with WSH, which is
really Jscript, ask in a a Jscript group - see FAQ 2.2.

<FAQENTRY> The Jscript link in 2.2 should be copied or moved into 2.7.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Nov 23 '05 #8
>>Is there any possible way to write a text file from JavaScript to the
local
machine ? Here the default assumption is Web use.

For that, write the data to a textarea and ask the user to copy'n'paste
it to where he wants it; or write it to a new window and ask him to use
File, Save As or equivalent. First, though, check that they work for an
arbitrary user and a page from a remote server.


Yes. I have considered that and will probably use that approach as it is
appropriate for the application I am working on but it would be nice to be
able to write files at some point.
To do that sort of thing in javascript run locally with WSH, which is
really Jscript, ask in a a Jscript group - see FAQ 2.2.


Probably just ActiveX in JavaScript to access WSH.

Aaron
Nov 23 '05 #9

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

Similar topics

20
by: svend | last post by:
I'm messing with some code here... Lets say I have this array: a1 = ; And I apply slice(0) on it, to create a copy: a2 = a1.slice(0); But this isn't a true copy. If I go a1 = 42, and then...
2
by: Brett Baisley | last post by:
Hello I have a block of html code that I want to run by calling a javascript function to print it. Its basically a table with menu items in it that is the same for many pages, and instead of...
2
by: Jack | last post by:
Hi, I have the following javascript that is written in html. It works great. However, I need to transfer the concept to an asp application where the form itself is an asp page. I was wondering if...
4
by: Prowler | last post by:
In the application we are currently building, we need to write positioning code on-the-fly, based upon the screen offset of the element in the AS/400 application which drives the Web app. The 400,...
12
by: Sean | last post by:
Hi, I have the following script: ----------------------------------------------------------------------------------- <script type="text/javaScript"> <!-- document.write('<div...
2
by: bissatch | last post by:
Hi, I am trying to use JavaScript to write a table column on a web page. The code is as follows: <html> <head> <script> function displaycount() {
4
by: frogman042 | last post by:
My daughter is playing around trying to learn JavaScript and she wrote a small program that prints out a message in increasing and decreasing font size and color changes. She is using document...
4
by: dsimmons | last post by:
On my website http://seasidequilters.blogspot.com/ I'm having a problem that someone thinks might be associated with Firefox browsers. I'm hoping to find someone in this forum that might be...
4
by: Fred Lazy | last post by:
Is is possible to retrieve the name of an .js file from within the .js file itself: For example, if the file is named "bla.js" and it is imported into an html document: <script...
5
by: Logos | last post by:
I'm having trouble with this in IE; annoyingly it works beautifully in FF. My keywords are not specific enough to narrow my search to useful entries on google, way too many hits, so here I am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.