Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > appending to a text file

Reply
Thread Tools

appending to a text file

 
 
llama.named.sue@gmail.com
Guest
Posts: n/a
 
      06-04-2007
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>

 
Reply With Quote
 
 
 
 
Tim Slattery
Guest
Posts: n/a
 
      06-04-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
(E-Mail Removed)
http://members.cox.net/slatteryt
 
Reply With Quote
 
 
 
 
llama.named.sue@gmail.com
Guest
Posts: n/a
 
      06-04-2007
On Jun 4, 9:08 pm, Tim Slattery <(E-Mail Removed)> wrote:
> (E-Mail Removed) 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
> (E-Mail Removed)://members.cox.net/slatteryt

ok,thanks.

 
Reply With Quote
 
Hal Rosser
Guest
Posts: n/a
 
      06-04-2007

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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 <script> tags.


 
Reply With Quote
 
llama.named.sue@gmail.com
Guest
Posts: n/a
 
      06-05-2007
On Jun 4, 11:53 pm, "Hal Rosser" <(E-Mail Removed)> wrote:
> <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) 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 <script> tags.


thanks for info

 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      06-05-2007
On 5 Jun, 01:03, (E-Mail Removed) wrote:
> On Jun 4, 11:53 pm, "Hal Rosser" <(E-Mail Removed)> wrote:
>
>
>
>
>
> > <(E-Mail Removed)> wrote in message

>
> >news:(E-Mail Removed) roups.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 <script> tags.

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




 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
appending a text string to the DataNavigateURLField property Jim in Arizona ASP .Net 0 05-08-2009 10:53 PM
appending the contents of multiple text files into 1 file Paul Danese Ruby 1 06-14-2007 04:25 PM
Appending Text To <%# Eval("...") %> In HTML? clintonG ASP .Net 2 01-22-2007 09:45 PM
replacing text at the beginning of a file in perl and appending to that output aixenv@yahoo.com Perl Misc 3 07-20-2005 06:17 PM
Appending Text to File - Please Help!!! Tapanan Yeophantong ASP General 1 10-18-2003 06:58 AM



Advertisments