Can you check to see if an object is visible using Javascript?
I have a form (asp.net) where only certain textboxes are visible under certain conditions (depending on the VB Session variables from previous pages). I want to check if they're visible and validate them if they are.
When I've tried to do this I got the following errors: "txtReview is null or not an object".
Can anyone help? Thanks
- LB
Problematic Code:
Expand|Select|Wrap|Line Numbers
- var doc = document.form1
- if (doc.txtReviewer.visible = true){
- if (doc.txtReviewer.value == ""){
- allFilled = false //boolean variable if required fields filled
- errMsg = errMsg + "\nReviewer Requires a Value" //message to hold all errors
- }
- }