Skip to main content
deleted 11 characters in body
Source Link
LinusG.
  • 29.4k
  • 32
  • 124
  • 183

I have the following in the page

<select name="val" size="1" > <option value="A">Apple</option> <option value="C">Cars</option> <option value="H">Honda</option> <option value="F">Fiat</option> <option value="I">Indigo</option> </select> 

I would like to remove certain values from my select if certain conditions are true.

E.g

if(frm.product.value=="F"){   -- // remove Apple and Cars from the select list   } 

How can I do this using javascript

I have the following in the page

<select name="val" size="1" > <option value="A">Apple</option> <option value="C">Cars</option> <option value="H">Honda</option> <option value="F">Fiat</option> <option value="I">Indigo</option> </select> 

I would like to remove certain values from my select if certain conditions are true.

E.g

if(frm.product.value=="F"){   -- remove Apple and Cars from the select list   } 

How can I do this using javascript

I have the following in the page

<select name="val" size="1" > <option value="A">Apple</option> <option value="C">Cars</option> <option value="H">Honda</option> <option value="F">Fiat</option> <option value="I">Indigo</option> </select> 

I would like to remove certain values from my select if certain conditions are true.

E.g

if(frm.product.value=="F"){ // remove Apple and Cars from the select list } 

How can I do this using javascript

Rollback to Revision 1
Link
ssube
  • 48.4k
  • 10
  • 107
  • 144
Source Link
Jacob
  • 14.8k
  • 69
  • 215
  • 323
Loading