> What you are saying works in Firefox, but it doesn't work in IE 6.

I think what he's saying is if you don't want the option to appear *at
all*, you have to remove it from the options list when you don't want
it and add it when you do; you can't "hide" it:

> > As far as hiding goes, I don't think options are affected by `display`
> > or `visibility` styles. You would probably need to remove/add it.

FWIW,
--
T.J. Crowder
tj / crowder software / com

On Oct 19, 5:07 pm, Cristisor <[EMAIL PROTECTED]> wrote:
> I'm sorry, I did a mistake in the code. It should be like this:
> $('Birthdate_Day').options[30].disabled = 1; only one "="
>
> What you are saying works in Firefox, but it doesn't work in IE 6.
>
> On Oct 19, 6:51 pm, kangax <[EMAIL PROTECTED]> wrote:
>
> > On Oct 19, 6:51 am, Cristisor <[EMAIL PROTECTED]> wrote:
>
> > > Hi. I have a select field that allows me to select a birthday. I need
> > > to decide how many days the field has according to the selected month.
> > > In Firefox I can hide days 30 and 31 using
> > > $('Birthdate_Day').options[30].hide(); or $
> > > ('Birthdate_Day').options[30].disabled == 1;
>
> > I assume it's a typo (equality operator), otherwise it wouldn't work
> > anywhere : )
>
> > > But this doesn't work in IE 6. Does anyone know another method? Thank
> > > you!
>
> > Are you trying to "hide" option or simply disable it? To disable it,
> > just assign a proper boolean value to its `disabled` property:
>
> > var lastOption = $('Birthdate_Day').options[30];
> > if (lastOption) lastOption.disabled = true;
>
> > As far as hiding goes, I don't think options are affected by `display`
> > or `visibility` styles. You would probably need to remove/add it.
>
> > --
> > kangax
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to