create a new option and inject into select box using mootools 1.2

Posted by Avinash on Stack Overflow See other posts from Stack Overflow or by Avinash
Published on 2010-02-20T03:58:10Z Indexed on 2010/05/07 5:18 UTC
Read the original article Hit count: 507

Filed under:
|
|
|

Hi

i have one AJAX function which return the list of countries. It works fine.

My problem is that want to load that countries in on select box which is already in HTML and is empty means no option value in it.

I want to know that how can i create a new option element and inject into the select box using moo tools 1.2

I have used below code but its not working in IE.

var NewOption = new Option("Select Sub Category",'0');

NewOption.inject($('nSub_nIndustryID'))

Thanks

Avinash

© Stack Overflow or respective owner

Related posts about mootools1.2

Related posts about JavaScript