Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Help...read value from hidden field


Message #1 by lawirene88@y... on Tue, 4 Dec 2001 10:11:05
Try this:

<script language="JavaScript">
 function checknumber(text){
 text = document.dopracticequestion.numerrors.value
 alert(text)
  }

That's how you get the value of the field...

----- Original Message -----
From: <lawirene88@y...>
To: "JavaScript HowTo" <javascript_howto@p...>
Sent: Tuesday, December 04, 2001 10:11 AM
Subject: [javascript_howto] Help...read value from hidden field


> Hi everybody,
>
> I'm new in JavaScript and ASP programming. So hopefully you guys out there
> can help me out.
>
> I'm trying to read a value from a hidden field when the page loads and
> when the value reaches a certain number, I want to open a new window. The
> problem is I can't read the value in the hidden field eventhough there is
> a number there. The message that appears in the pop-up message
> is "undefined"
>
>
>  My code is as follows:
>
> <script language="JavaScript">
> function checknumber(text){
> text = document.dopracticequestion.numerrors
> alert(text)
>  }
>
> </script>
> The name of my hidden field is numerrors. I used ASP to fill in the value
> of the hidden field using a session variable
>
> Thanks for your help
$subst('Email.Unsub')
>
>
>



  Return to Index