[Javascript] How to prevent user from selecting in select box

Chris T christ at saeweb.com
Wed Mar 31 08:39:22 CST 2004


Or one possibility is to set it back to it's initial value on the onChange
event and alert the user.

Chris Tifer

----- Original Message ----- 
From: "Håkan Magnusson" <hakan at backbase.com>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Wednesday, March 31, 2004 8:06 AM
Subject: Re: [Javascript] How to prevent user from selecting in select box


> Sorry, readonly will not work.
>
> How about returning false on both onfocus and onchange?
>
> I'm too busy trying anything out myself, just pitching in a few ides.
>
> Regards,
> H
>
> Antony Paul wrote:
>
> > Hi all,
> >     I have a select box which is dynamically generated for editing the
data.
> > Based on a condition it has to be disabled. If I use the disabled
attribute
> > it won't submit the value of the select box and I have to display the
data.
> > I tried onfocus and onclick. But it is not working. Any solutions will
be
> > appreciated. I need some way to avert the selection.
> >
> > Antony Paul
> >
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > https://lists.LaTech.edu/mailman/listinfo/javascript
> >
> >
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list