Is this what you're going for?
Code:
<script language="JavaScript" type="text/javascript">
function change_button(this_button)
{
document.getElementById(this_button).value = (document.getElementById(this_button).value == 'Hello')? 'World' : 'Hello';
}
</script>
<form action="javascript:void(0);">
<input type='submit' name'button' value='Hello' id='this_button' onclick='change_button("this_button");' />
</form>
hth,
Rich
::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::