473,396 Members | 2,109 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,396 software developers and data experts.

appending to a text file

hey,
Can someone please tell me is it possible to append to a text file
using javascript?I've read that you can and that you can't and I'm
lost now!I heard you can get around it by using xml?I need to read in
information from a prompt box and append it to an existing text file
which is currently called helloworld.txt. any ideas on what is the
most appropriate way to do this?Any help is appreciated.
thanks!
<img onclick="showCoords(event)" src="http://www.tuam-guide.com/
images/galway-city-map.gif" alt="Galway Map" />
<script type="text/javascript">

var destination
var coords = new Array(4)
var email
function showCoords(event){
if (destination==0) {
coords[2] = event.clientX
coords[3] = event.clientY
destination=1

if(confirm("would you like to view matches?"))
{
email = prompt("Please enter your email address","")

}

else

{
alert("Thank you for visiting")

}

}
else {
coords[0] = event.clientX
coords[1] = event.clientY
destination=0
alert("Click on destination.")

}
}

</script>

Jun 4 '07 #1
5 7122
ll*************@gmail.com wrote:
>hey,
Can someone please tell me is it possible to append to a text file
using javascript?
Not on the client side. You do not have access to the client's file
system.

--
Tim Slattery
Sl********@bls.gov
http://members.cox.net/slatteryt
Jun 4 '07 #2
On Jun 4, 9:08 pm, Tim Slattery <Slatter...@bls.govwrote:
llama.named....@gmail.com wrote:
hey,
Can someone please tell me is it possible to append to a text file
using javascript?

Not on the client side. You do not have access to the client's file
system.

--
Tim Slattery
Slatter...@bls.govhttp://members.cox.net/slatteryt
ok,thanks.

Jun 4 '07 #3

<ll*************@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
hey,
Can someone please tell me is it possible to append to a text file
using javascript?I've read that you can and that you can't and I'm
lost now!I heard you can get around it by using xml?I need to read in
information from a prompt box and append it to an existing text file
which is currently called helloworld.txt. any ideas on what is the
most appropriate way to do this?Any help is appreciated.
thanks!
If the text file is on the server, you can use ASP with server-side
Javascript, but you can not write to a file from JavaScript that's on an
html page in <scripttags.
Jun 4 '07 #4
On Jun 4, 11:53 pm, "Hal Rosser" <hmros...@bellsouth.netwrote:
<llama.named....@gmail.comwrote in message

news:11**********************@p77g2000hsh.googlegr oups.com...
hey,
Can someone please tell me is it possible to append to a text file
using javascript?I've read that you can and that you can't and I'm
lost now!I heard you can get around it by using xml?I need to read in
information from a prompt box and append it to an existing text file
which is currently called helloworld.txt. any ideas on what is the
most appropriate way to do this?Any help is appreciated.
thanks!

If the text file is on the server, you can use ASP with server-side
Javascript, but you can not write to a file from JavaScript that's on an
html page in <scripttags.
thanks for info:)

Jun 5 '07 #5
Bob
On 5 Jun, 01:03, llama.named....@gmail.com wrote:
On Jun 4, 11:53 pm, "Hal Rosser" <hmros...@bellsouth.netwrote:


<llama.named....@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
hey,
Can someone please tell me is it possible to append to a text file
using javascript?I've read that you can and that you can't and I'm
lost now!I heard you can get around it by using xml?I need to read in
information from a prompt box and append it to an existing text file
which is currently called helloworld.txt. any ideas on what is the
most appropriate way to do this?Any help is appreciated.
thanks!
If the text file is on the server, you can use ASP with server-side
Javascript, but you can not write to a file from JavaScript that's on an
html page in <scripttags.

thanks for info:)- Hide quoted text -

- Show quoted text -
If you use a cookie you can write to a file on the client's 'puter.


Jun 5 '07 #6

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

Similar topics

1
by: dmiller23462 | last post by:
Hey guys.... I put an error-handling in my page and have it posted at the complete end of the code, see below(when people were putting in 's I was getting the delimiter errors). Great, I...
10
by: Bobby T | last post by:
Here's the problem, when I try to append an RDP file (which is written in hex but readable in notepad) it adds funny little squares to the file. I have tried opening the file in every mode but...
1
by: Jonathan Taylor | last post by:
I have a large XML file, that is too large to read in to XmlDocument. I need to append data to this XML file without creating a new file, since I don't want to have two copies of the large file...
16
by: Michael | last post by:
I have a data application in a2k that I need to create two fixed width text files and then combine them to a single file The first file is header information and the second is transaction data. ...
3
by: Mike P | last post by:
Does anybody have a simple example of appending text to a text file? Cheers, Mike *** Sent via Developersdex http://www.developersdex.com ***
1
by: mikemac76 | last post by:
I am trying to build a test harness to practice appending strings to an rtf string. I am doing this to simulate the string I'll be sending over the wire and receiving on the other end of an IM...
2
by: tony.collings | last post by:
I started a thread here : http://groups.google.co.uk/group/microsoft.public.cmserver.general/browse_thread/thread/29d63077144004a9/c3888efdcb7338f6?hl=en#c3888efdcb7338f6 About creating an Email...
3
by: Donald Grove | last post by:
Is it possible to append records to a space delimited text file, using Access 2000?
3
by: Jim | last post by:
Could anyone please point me towards some code that allows me to add to an existing XML file using the output of an HTML form. I want to add a form on my website so users can input their email...
2
by: mosscliffe | last post by:
I have a simple form with a multiline Textbox. I load the textbox with the contents of a text file. I make changes to the textbox, then I attempt to OVERWRITE the original file. I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.