Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Assigning a value in a text box from a function


Message #1 by delcyan@w... on Mon, 10 Jun 2002 21:07:21
try :

document.SurveyForm.anshd.value='1';

At 21:07 10/06/02 +0000, you wrote:
>Hello all,
>
>I have a function that validates whether the right information has been
>entered by the user. If the function returns a true, I know everything is
>fine, therefore would like to assign a value "-1" in a hidden textbox and
>then submit the form.
>
>I have used "SurveyForm.anshd.value = -1;" where SurveyForm is my form
>name and anshd is my text box. I would like to assign it a -1 value.
>
>This simple thing to do in VB is not happening in javascript for me. Could
>someone please guide me of what I am doing wrong.
>
>Thank you.
>
>Anthony
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20



  Return to Index