writing Vars to a Text file

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

    writing Vars to a Text file

    Hi

    I have a javascript with a separate .js file for configuring the variables.
    I want the script user to be able to set these variables through a graphical
    html page form. Can you point me in the right direction for doing this.
    Thank You.

    AL:


  • Zac Hester

    #2
    Re: writing Vars to a Text file

    "luke walker" <andy_levy@hotm ail.com> wrote in message
    news:odUSa.1760 2$Df6.15649@new s-binary.blueyond er.co.uk...[color=blue]
    > Hi
    >
    > I have a javascript with a separate .js file for configuring the[/color]
    variables.[color=blue]
    > I want the script user to be able to set these variables through a[/color]
    graphical[color=blue]
    > html page form. Can you point me in the right direction for doing this.
    > Thank You.
    >
    > AL:[/color]

    If the .js file is on the server, you will need to use a server-side
    execution environment. I would recommend PHP, Perl, or JSP. (If you want
    to make sure ol' Bill has a warm place to sleep tonight, you could also look
    into ASP.) PHP is the easiest for a beginner to learn. The syntax is
    pretty similar to JavaScript. You just have to make sure your web hosting
    provider supports PHP. In your case, you could have a user submit an HTML
    form, that could then generate a ".js" file on the fly. If you need the .js
    file to persist after that particular user is not on your web site (like in
    an installer script), you could also use PHP to just write out the .js file
    to the server's disk. Both methods are very easy when you learn PHP.

    If the .js file is on the client, you will not be able to make any changes
    through a web page. So, I'm assuming it's server side.

    For info on getting started with PHP, go here:

    PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.


    HTH,
    Zac



    Comment

    Working...