appending to a text file

  • Thread starter llama.named.sue
  • Start date
L

llama.named.sue

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>
 
T

Tim Slattery

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.
 
H

Hal Rosser

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 <script> tags.
 
L

llama.named.sue

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 <script> tags.

thanks for info:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,809
Latest member
moe77

Latest Threads

Top