...

View Full Version : writing data to txt file on external server



Fadyselim
12-18-2011, 03:55 PM
well i'm kind of new to this website and scripting with javascript but i am wondering:
in a client side .js file i have some coding which results in a string which is stored in a variable called exportData

now i want that string to be written into a text file on a server but how do i do that?
it is not local on the client's pc and i can't find how to do it anywhere...
can you guys help me?

greetings,
Fady

Philip M
12-18-2011, 04:33 PM
JavaScript is purely a client-side language, and unless used with an Ajax call has no capability to read from or write to a file (except a cookie), communicate with the server, access a database, the client's operating system or the Windows registry, or alter the default behaviour of the browser.


All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

Fadyselim
12-18-2011, 04:50 PM
but then how can i do this?
is there any way to do this from my javascript file?
i have a php website hosted on a server and that's where i want to send it to
have you got a clue on how to do this then?

greetings,
Fady

tracknut
12-18-2011, 06:29 PM
I think he said it, you need to use Ajax (Javascript+PHP) to do it.

Dave

Fadyselim
12-18-2011, 06:36 PM
Ow sorry, couldn't really find that in.his post
Thank you, both of you

Greetings,
Fady



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum