Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I refer to myLabel.text in javascript?

Status
Not open for further replies.

j9

Programmer
Jun 6, 2001
90
0
0
US
I have a javascript function that is called when I click my server-side submit button. I want to validate that one of my labels is not empty before allowing a submit.
I cannot figure out how to access the value stored in myLabel.text.

For hidden form variables I use the following syntax in javascript: myForm.myHidden.value

I tried a bunch of different things with no luck! Thanks in advance for any help!
 
I want to validate that one of my labels is not empty before allowing a submit.
Why do it yourself when there are validator controls (RequiredFieldValidator) that are there to provide this functionality?


----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
I always put things in text boxes if i need javascript validation...not sure if you can call the label from within javascript...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top