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

Håkan Magnusson hakan at backbase.com
Wed Mar 31 07:11:09 CST 2004


onfocus="this.blur()"

worked in Mozilla.
OK, so I AM trying stuff out. I blame the irritating fact that I didn't 
know the answer to this up front. :)

Regards,
H

Håkan Magnusson wrote:

> 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