How to change a form field value pushing a button

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I want to change the value of a form field when I push a
button. How can I do this? Im trying to write a java
script to do this, but it isn't changing the value. My
form name is form1, the field I want to set is P1. I have
created a javascript function that uses the setAttribute
method and I am trying to set the form1 attirbute P1
to "2".

Any other ideas?
 
I want to change the value of a form field when I push a
button. How can I do this? Im trying to write a java
script to do this, but it isn't changing the value. My
form name is form1, the field I want to set is P1. I have
created a javascript function that uses the setAttribute
method and I am trying to set the form1 attirbute P1
to "2".

Any other ideas?

form1.P1.value = "2";
 
Back
Top