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