How to create an object of option for a combobox
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ramesh_Chowdhary
Posted On:   Saturday, February 1, 2003 06:05 AM

New Document function checkOne(locale) { var loop=0; var flag=1; if(document.forms['myform'].elements['en_US'].checked==false&&document.forms['myform'].elements['ja_JP'].checked==false&&document.forms['myform'].elements['es_SP'].checked==false) { flag=0; } else { unCheck(); flag=1; } if(flag==0) { alert("NOT POSSIBLE"); document.forms['myform'].elements[locale].checked=true; } flag=1; } function unCheck() { var selectLength = document.forms['myform'].locale.options.length; var optLocale = new Array(selectLength); //optLocale.value=document.forms['myform'].locale.options[0].value; //optLocale.text=document.forms['myform'].locale.options[0].text; //document.forms['myform'].options[obj.options.length]=new option("abc",1) if(docume   More>>
New Document

I have some checkbox. If I deselect the checkbox then the related option value gets deleted and again if I select that checkbox the option value gets added. How to create an object of option for a combobox and add to the combobox
















EN_US
JA_JP
ES_SP


   <<Less

Re: How to create an object of option for a combobox

Posted By:   Nitesh_Naveen  
Posted On:   Monday, February 3, 2003 03:06 AM

See this faq about deleting/adding new options to a select. (click here) You could use this in the onlcik of the check box
About | Sitemap | Contact