Hide and Show

L

Louise Woodward

I have a table with 20 rows and I have a label on a form that I would like
to hide and show and this label can be on certain rows - this is row2

I have tried using Form1.MinLabel2.style.display = ""; or "none" and it
comes up with the error Form1.MinLabel2.sytle is null or not an object

Can I do this with a label or just input boxes ??
Why is this ??
 
W

W d'Anjos

You should be able to do this with labels also. Please post your
code, I think there is something wrong on the label definition.

-Wagner
 
L

Lee

W d'Anjos said:
You should be able to do this with labels also. Please post your
code, I think there is something wrong on the label definition.

No, you shouldn't be able to refer to labels as elements of a form.
In fact, you shouldn't be able to refer to a form simply as "Form1",
but some browsers will let you get away with that.

document.getElementById("MinLable2").style.display
 
W

W d'Anjos

Since you have multiple labels on your form, Form1.MinLabel2 is an array. Try:

if (Form1.MinLabel2.length){ // tests if MinLabel2 has mutiple instances
for (i=0; i < Form1.MinLabel2.length; i++)
Form1.MinLabel2.style.display = "none";
}else{
Form1.MinLabel2.style.display = "none";
}

I hope this helps.

Wagner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top