If you don't have or can't add an easy id to identify it, I am guessing you
will need to walk through the labels, looking for one that matches the FOR
you are looking at, and hiding it.


something like this to find the label for a given id
function getLabelForId(id) {
 var label, labels = document.getElementsByTagName('label');
 for (var i = 0; (label = labels[i]); i++) {
   if (label.htmlFor == id) {
     return label;
   }
 }
 return false;
}
(stolen wholesale from
http://www.sitepoint.com/article/simple-tricks-usable-forms/3)


On Fri, Jun 27, 2008 at 2:45 PM, Charlie Griefer <[EMAIL PROTECTED]>
wrote:

> it can stay wrapped in the label, but you'll need to give the label an
> ID attribute.
>
> <label for="field_CLASSIFIED_2_1" id="lblClassified_2_1">Text here</label>
>
> document.getElementById('lblClassified_2_1').style.display = "block |
> none";
> document.getElementById('lblClassified_2_1').style.visibility =
> "visible | hidden";
>
> On Fri, Jun 27, 2008 at 11:22 AM, Erika L. Walker <[EMAIL PROTECTED]>
> wrote:
> > It currently looks like this:
> >
> > <label for="field_CLASSIFIED_2_1">Text here</label>
> >
> > I dont have control to wrap it in anything else ... can it be manipulated
> > with the way it is?
> >
> > On Fri, Jun 27, 2008 at 2:18 PM, Charlie Griefer <
> [EMAIL PROTECTED]>
> > wrote:
> >
> >> you'll need to wrap the label in a span with an ID...
> >>
> >> <span id="mylabel">labelText</span>
> >>
> >> in your function add:
> >>
> >> document.getElementById('labelText').style.visibility = "hidden";
> >>
> >> realize that the 'visible' property doesn't remove an element from the
> >> page flow, so you'll have a big empty space in your page.
> >>
> >> manipulating the "display" value to display = "none"; and dispay =
> >> "block"; will take the element out of the page flow and might be more
> >> what you're looking for.
> >>
> >>
> >>
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:263012
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Reply via email to