Connecting Tech Pros Worldwide Help | Site Map

Hide and Show

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 20th, 2005, 11:23 AM
Louise Woodward
Guest
 
Posts: n/a
Default Hide and Show

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 ??




  #2  
Old July 20th, 2005, 11:24 AM
W d'Anjos
Guest
 
Posts: n/a
Default Re: Hide and Show

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

"Louise Woodward" <lwoodward@opaltelecom.co.uk> wrote in message news:<UW8nb.1587$F07.11390335@news-1.opaltelecom.net>...[color=blue]
> 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 ??[/color]
  #3  
Old July 20th, 2005, 11:24 AM
Lee
Guest
 
Posts: n/a
Default Re: Hide and Show

W d'Anjos said:
[color=blue]
>"Louise Woodward" <lwoodward@opaltelecom.co.uk> wrote in message
>news:<UW8nb.1587$F07.11390335@news-1.opaltelecom.net>...[color=green]
>> 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 ??[/color][/color]
[color=blue]
>You should be able to do this with labels also. Please post your
>code, I think there is something wrong on the label definition.[/color]

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

  #4  
Old July 20th, 2005, 11:24 AM
Louise Woodward
Guest
 
Posts: n/a
Default Re: Hide and Show

my label is just <label id="minlabel2">minimum label</label>


"W d'Anjos" <wanjos@yahoo.com> wrote in message
news:b36d147d.0310271358.73306909@posting.google.c om...[color=blue]
> 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
>
> "Louise Woodward" <lwoodward@opaltelecom.co.uk> wrote in message[/color]
news:<UW8nb.1587$F07.11390335@news-1.opaltelecom.net>...[color=blue][color=green]
> > I have a table with 20 rows and I have a label on a form that I would[/color][/color]
like[color=blue][color=green]
> > 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 ??[/color][/color]


  #5  
Old July 20th, 2005, 11:24 AM
W d'Anjos
Guest
 
Posts: n/a
Default Re: Hide and Show

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[i].style.display = "none";
}else{
Form1.MinLabel2.style.display = "none";
}

I hope this helps.

Wagner

"Louise Woodward" <lwoodward@opaltelecom.co.uk> wrote in message news:<gFqnb.1590$F07.11472225@news-1.opaltelecom.net>...[color=blue]
> my label is just <label id="minlabel2">minimum label</label>
>
>
> "W d'Anjos" <wanjos@yahoo.com> wrote in message
> news:b36d147d.0310271358.73306909@posting.google.c om...[color=green]
> > 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
> >
> > "Louise Woodward" <lwoodward@opaltelecom.co.uk> wrote in message[/color]
> news:<UW8nb.1587$F07.11390335@news-1.opaltelecom.net>...[color=green][color=darkred]
> > > I have a table with 20 rows and I have a label on a form that I would[/color][/color]
> like[color=green][color=darkred]
> > > 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 ??[/color][/color][/color]
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.