writing Vars to a Text file

L

luke walker

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:
 
Z

Zac Hester

luke walker said:
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:

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:

http://www.php.net

HTH,
Zac
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,077
Messages
2,570,566
Members
47,202
Latest member
misc.

Latest Threads

Top