disabling select 
Author Message
 disabling select

Hi ,
        Here we would like the user to avoid selecting on
the select  html control(in certain cases )

we have an option 'readonly' for text controls and that doesnt work for
'select'

although the option 'disabled' does achieve the task the form values arent
submitted to the server

Kind regards

Bijoy



Tue, 07 Sep 2004 09:07:24 GMT  
 disabling select

| although the option 'disabled' does achieve the task the form values arent
| submitted to the server

Include in your onsubmit function one of the following two lines (I'm not
sure which one is the correct one, or maybe both will work):

delete document.forms[0].FIELD_NAME.disabled;
document.forms[0].FIELD_NAME.disabled = false;

--
:: "Ekevu Guepardo" ::
:: Acinonyx jubatus ::
:: Porto Alegre, BR ::



Tue, 07 Sep 2004 10:06:12 GMT  
 disabling select
If it's disabled, why does it have to be a SELECT element?  Make it a text
field.  Then the value is still sent.  If it is a multi-select and you want
to show multiple disablde items, make it a TEXTAREA.

www.aspfaq.com


Quote:
> Hi ,
>         Here we would like the user to avoid selecting on
> the select  html control(in certain cases )

> we have an option 'readonly' for text controls and that doesnt work for
> 'select'

> although the option 'disabled' does achieve the task the form values arent
> submitted to the server

> Kind regards

> Bijoy



Wed, 08 Sep 2004 03:24:46 GMT  
 disabling select
Copy the value of the SELECT to a hidden field, and then disable the SELECT.
Then use the hidden field server-side.


Quote:
> Hi ,
>         Here we would like the user to avoid selecting on
> the select  html control(in certain cases )

> we have an option 'readonly' for text controls and that doesnt work for
> 'select'

> although the option 'disabled' does achieve the task the form values arent
> submitted to the server

> Kind regards

> Bijoy



Thu, 09 Sep 2004 00:19:38 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Disable select option?

2. Programatically disabling a given SELECT OPTION

3. disabling a select list

4. Disable Printing of Selected Web Pages

5. Disabling Printing For Selected Web Pages

6. Disable fields as Select changes

7. Selecting/Disabling radio buttons

8. Disable Printing of Selected Web Pages

9. Disabling Printing For Selected Web Pages

10. disable close button without disabling make small button

11. vb Select * from tableA?How to select record from 1000 to 2500

12. Programatically setting the SELECTED OPTION of a SELECT

 

 
Powered by phpBB® Forum Software