If not a reading from file then what?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Q

    #1

    If not a reading from file then what?

    Hello,

    I looked through some posting of this group and understood that for
    JavaScript it is not natural ot read from a file. Isn't that so? If it
    is a case, what is the best solution for the following problem.
    Visitor of a wep page creates some data which will be changed during
    next subsequent visit of this page. I wanted to store this data in a
    file on the server side and then read this data at next conection of
    the corresponding user. The first reason of doing this is that I do
    not whant user has a possibility to chang this data in his unprovided
    way.

    Thank you.
  • Douglas Crockford

    #2
    Re: If not a reading from file then what?

    > I looked through some posting of this group and understood that for[color=blue]
    > JavaScript it is not natural ot read from a file. Isn't that so? If it
    > is a case, what is the best solution for the following problem.
    > Visitor of a wep page creates some data which will be changed during
    > next subsequent visit of this page. I wanted to store this data in a
    > file on the server side and then read this data at next conection of
    > the corresponding user. The first reason of doing this is that I do
    > not whant user has a possibility to chang this data in his unprovided
    > way.[/color]

    Right, so you send the data back to the server. You do that with an HTTP
    POST, and you can do that by submitting a <form>.


    Comment

    • Evertjan.

      #3
      Re: If not a reading from file then what?

      Q wrote on 23 jan 2005 in comp.lang.javas cript:
      [color=blue]
      > I looked through some posting of this group and understood that for
      > JavaScript it is not natural ot read from a file. Isn't that so?[/color]

      Even if it where not unnatural that would not change the outcome
      [color=blue]
      > If it
      > is a case, what is the best solution for the following problem.
      > Visitor of a wep page creates some data which will be changed during
      > next subsequent visit of this page. I wanted to store this data in a
      > file on the server side and then read this data at next conection of
      > the corresponding user. The first reason of doing this is that I do
      > not whant user has a possibility to chang this data in his unprovided
      > way.
      >[/color]

      You can do that with javascript,
      using serverside javascript under ASP.

      Clientside coding, javascript or whatever,
      cannot access files on the server.

      --
      Evertjan.
      The Netherlands.
      (Replace all crosses with dots in my emailaddress)

      Comment

      Working...