If you create one that only works once and then can't be ran again it means there's a mistake in the script, not one bad enough to keep it from running once but bad enough to keep any more scripts from running again unless the page is reloaded. I know this because while writing the scripts to be called I made a mistake that I didn't notice and after testing the page I noticed the scripts only ran once. I looked over my scripts and found a simple mistake. Now that I've got that fixed they will run over and over again.
What you are doing when you do this is making a JavaScript function. Instead of just writing a script up in the head of the page you write a function up in the head of the page.
The function is called using a form wich is what we went over on the last page.
.
Here is a sample function and form to call the function
You can place multiple functions up in the head of your page, and then call them by different buttons located on your page.
.
Here is how you make the button to call it up
Now lets say you have multiple functions at the and you want the button side by side like I have at the top of this page. When ever you start a new form you get a line break. You don't have to start a new form for each button.
I have added two more functions to my page. sampleA() and sampleB() wich brings the total to 5. Remember a mistake will cause the rest to stop working too. So it is best to add your functions one at a time and test after each addition. If you write a bunch of functions and then test it you may not know where your error is. this may be different on a computer but since I am on webtv that is how it works for me.
Also the variables from one function can be used in the others. If a prompt came up and asked for a name you could use the variable again later in a different script so you wouldn't have to ask the questions again. But if the question hadn't been asked yet and you tried to use it the script would fail and may cause the rest of your scripts to fail.
I will add more to this as I learn more. Or find mistakes I have made on this page. Remeber if you need help there is a message board at the bottom of page 1
The next page will be on making password so only invited people can view your page.