auto reset when select another Selector list
<p><a href="http://bluewingholidays.com/trincomalee" rel="nofollow">MY SITE SEARCH HERE</a></p>

<p>In above search when i  select another province when it have a value other town,district field didn't reset automatically.User must press the clear button for that.it is not used full through.How to do this with javascript/Jquery...My search.js is bellow </p>

<pre><code>JEASearch = new Class({

    Implements: [Options],

    form: null,

    forceUpdateLists : false,

    options: {
        fields : {

            filter_area_id : 0,
            filter_department_id : 0,
            filter_search : "",
            filter_town_id : 0
        },
        useAJAX : false
    },

    initialize: function(formId, options) {
        this.form = document.id(formId);
        this.setOptions(options);
        this.forceUpdateLists = true;

        if (this.options.useAJAX) {
            for (var fieldName in this.options.fields) {
                if (fieldName == 'filter_amenities') {
                    fieldName = 'filter_amenities[]';
                }
                this.initFieldBehavior(fieldName);
            }
        }

        this.form.addEvent('reset', this.reset.bind(this));
    },

    initFieldBehavior : function(fieldName) {
        if (this.form[fieldName]) {
            if (typeOf(this.form[fieldName]) == 'element') {
                var field = document.id(this.form[fieldName]);
                field.addEvent('change', function(event) {
                    this.forceUpdateLists = false;
                    this.options.fields[fieldName] = field.get('value');
                    this.refresh();
                }.bind(this));

            } else if (typeOf(this.form[fieldName]) == 'collection') {
                if (fieldName == 'filter_amenities[]') {
                    Array.from(this.form['filter_amenities[]']).each(function(item) {
                        item.addEvent('change', function(event) {
                            var index = this.options.fields.filter_amenities.indexOf(item.get('value'));
                            this.forceUpdateLists = true;
                            if (item.get('checked') &amp;&amp; index == -1) {
                                this.options.fields.filter_amenities.push(item.get('value'));
                            } else if (!item.get('checked') &amp;&amp; index &gt; -1){
                                this.options.fields.filter_amenities.splice(index, 1);
                            }
                            this.refresh();
                        }.bind(this));
                    }.bind(this));
                } else if (fieldName == 'filter_transaction_type') {
                    var transTypes = document.getElements('[name=filter_transaction_type]');
                    transTypes.each(function(item) {
                        item.addEvent('change', function(event) {
                            this.forceUpdateLists = true;
                            if (item.get('checked')) {
                                this.options.fields.filter_transaction_type = item.get('value');
                            }
                            this.refresh();
                        }.bind(this));
                    }.bind(this));
                }
            }
        }
    },

    refresh: function() {
        if (this.options.useAJAX) {
            var jSonRequest = new Request.JSON({
                url: 'index.php?option=com_jea&amp;task=properties.search&amp;format=json',
                onSuccess: function(response) {
                    this.appendList('filter_type_id', response.types);
                    this.appendList('filter_department_id', response.departments);
                    this.appendList('filter_town_id',response.towns);
                    this.appendList('filter_area_id', response.areas);
                    this.form.getElements('.jea-counter-result').each(function(item){
                        item.set('text', response.total);
                    });
                }.bind(this)
            });

            jSonRequest.post(this.options.fields);
        }
    },

    reset : function() {
        this.options.fields = {

            filter_area_id : 0,
            filter_department_id : 0,
            filter_search : "",
            filter_town_id : 0,
        };

        for (var fieldName in this.options.fields) {
            if (this.form[fieldName]) {
                if (typeOf(this.form[fieldName]) == 'element') {
                    var field = document.id(this.form[fieldName]);
                    if (field.get('tag') == 'select') {
                        field.set('selectedIndex', 0);
                    }
                    field.set('value', '');

                } else if (typeOf(this.form[fieldName]) == 'collection') {
                    Array.from(this.form[fieldName]).each(function(item) {
                        item.set('checked', '');
                    });
                }
            }
        }

        this.refresh();
    },

    appendList : function(selectName, objectList) {
        if (this.form[selectName]) {
            var selectElt = document.id(this.form[selectName]);
            // Update the list only if its value equals 0
            // Or if this.forceUpdateLists is set to true
            if (selectElt.get('value') == 0 || this.forceUpdateLists) {
                var value = selectElt.get('value');

                // Save the first option element
                var first = selectElt.getFirst().clone();
                selectElt.empty();
                if (first.get('value') == 0) {
                    selectElt.adopt(first);
                }

                for (var i in objectList) {
                    if (objectList[i].text) {
                        var option = new Element('option', objectList[i]);
                        if (objectList[i].value == value) {
                            option.setProperty('selected', 'selected');
                        }
                        selectElt.adopt(option);
                    }
                }
            }
        }
    }

});
</code></pre>
