S
Stephan Schulz
Hi all,
I'm fairly new to JavaScript, and couldn't find a way to solve the
following problem:
I've written an application in DHTML/JavaScript, for one because I
want to be able to offer access on the web, but primarily because it
was the easiest way for me to combine GUI and layout in a portable
manner.
In case you wonder, it is a character generator for pen-and-paper
roleplaying game (http://www.eprover.org/ROLESIM/chargen2.html -
German language, but code and comments are (mostly) English).
It is still preliminary, but works fine. However, the first time my
users used it, they immediately wanted to safe their characters for
later updates. I know that JavaScript has no direct access to the
local file system (and for good reasons), but we came up with the idea
of storing a character profile in a cookie.
My first test seems to work, but only when the page is actually served
via a web server. The more frequent use case is that the program is
run from a local file. In tat case, it seems that the cookie is not
set at all.
Is there any way around this problem (short of running a cooperating
webserver on each users computer)? Maybe it's just an issue with
setting the proper domain?
Thanks!
Bye,
Stephan
I'm fairly new to JavaScript, and couldn't find a way to solve the
following problem:
I've written an application in DHTML/JavaScript, for one because I
want to be able to offer access on the web, but primarily because it
was the easiest way for me to combine GUI and layout in a portable
manner.
In case you wonder, it is a character generator for pen-and-paper
roleplaying game (http://www.eprover.org/ROLESIM/chargen2.html -
German language, but code and comments are (mostly) English).
It is still preliminary, but works fine. However, the first time my
users used it, they immediately wanted to safe their characters for
later updates. I know that JavaScript has no direct access to the
local file system (and for good reasons), but we came up with the idea
of storing a character profile in a cookie.
My first test seems to work, but only when the page is actually served
via a web server. The more frequent use case is that the program is
run from a local file. In tat case, it seems that the cookie is not
set at all.
Is there any way around this problem (short of running a cooperating
webserver on each users computer)? Maybe it's just an issue with
setting the proper domain?
Thanks!
Bye,
Stephan