Is there a mooish way to remove all items from a select?
This is what I have while it works its not very elegant

Element.implement({
    removeOptions: function () {
        for (var count = this.options.length - 1; count >= 0; count--)
{
            this.removeChild(this.options[count]);
        }
    }
});

Same problem with adding:

    data.each(function (itm) {
        try {
            $('ddArtists').add(new Option(itm.Text, itm.Value),
null);  // Everything else
        }
        catch (ex) {
            $('ddArtists').add(new Option(itm.Text, itm.Value));  //
IE (Maybe others)
        }
    });
}

Reply via email to