Click to See Complete Forum and Search --> : change button value on click


Code One
11-20-2003, 08:04 PM
hello,
i was wanting to know how to change the value of one button, to another value, by clicking another button on the same page. For example:

Button1 value= "Click" :to change value of button2
Button2 value= "Hello" :button to change
Button2 value (after click of button1) = "Bye" :button2 new value after click of button1.

You guys get it, can you help me?

Thanks

Code One

Pittimann
11-21-2003, 04:14 AM
Hi!

Do something like that:

<form name="MyForm">
<input type=button value="Click" onclick="javascript:document.MyForm.ChangeMe.value='Bye'">
<input type=button value="Hello" name="ChangeMe">
</form>

Cheers - Pit

Code One
11-21-2003, 04:32 AM
I actaully already figured this one out, and it actually needed to change the val of another button including it's self, and I worked it out. Thanks for posting though, I totally appreciate your help!!!!

regards

Code One