I\'m sure I\'m going to feel stupid after seeing the answer, but I keep running into prehistoric code around the web, which I\'m not sure still applies. My question is \"How
Your code works, but isn't doing what you probably expect. Your followed by shows the text of the button and it's initial value, however your code will change the value before the form is submitted. That means, the receiving page (most often a php/perl/asp script) will see the changed value passed as a GET or POST parameter.
If you want to change the text w/o submitting the form you might want to try this:
function changeValue(id, newText) {
var el = document.getElementById(id);
el.value = newText; // change the value passed to the next page
el.innerHTML = newText; // change the displayed text on the screen
return false;
}