We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi
I'm trying to create a file in a sketch in the javascript mode of processing but I don't found resources. I want to create a log when the sketch was published in my server...
The SaveString and Printwriter libraries don't work in the javascript mode, anyone know some suggestion??
Thaaaanks !!
Answers
http://ProcessingJS.org/reference/saveStrings_/
Sorry but this function doesn't work in the sketch when I publish it in the javascript mode... :(
Can you be clearer on what you're trying to achieve: where do you want the log saved? I'd expect saveStrings to spit a file out at the client side since that's where the code is executed. It may also be subject to browser security restrictions: I'd expect at the least a prompt to confirm allowing it to write a file...
Ok... I want save the log files in the server side. It is possible?
Pretty sure the question of writing to the server side has cropped up before. Simplest solution is probably to do it with ajax: do a POST or GET on the client side that hits a script hosted on the server (might be PHP, or some other language depending on what you have available) that then writes to the log file...
Thankyou !!