How to Disable a select box but still send the data when I submit the form
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   3PO_Ninja
Posted On:   Thursday, February 23, 2006 09:51 AM

Hi

small problem , I'm trying to disable a drop down list but I want it to still send the content (default selected item) when I submit the form , basically I want it to behave like read-only any thoughts

Re: How to Disable a select box but still send the data when I submit the form

Posted By:   Vinod_Yadav  
Posted On:   Friday, February 24, 2006 05:11 AM

Hii Ninja!!!

While submitting data change the name/id of the disabled drop down list box.
Create new hidden field using dom.set it to orignal name/id ,set its value .That's It!!
post the data :)
e.g


Your dropdown list box name is "drplist1".




before to submission changed it to drplist2



create new hidden text field named with "drplist1" and set its value=drplist2 value
or



you can use global variable to assign the value of orignal drplist1 value



now submit the data



hope this will help you

Cheers :)

Re: How to Disable a select box but still send the data when I submit the form

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, February 23, 2006 10:08 AM

Use the onChange event of the select to set a hidden field. When you disable the select, the hidden field is sent instead.
About | Sitemap | Contact