title: Calling javascript function from html drop down automatically
body: <p>I am not good in html or JavaScript and I have been trying alot to automatically call the JavaScript function from html drop down.
  My requirement is to hide the html drop down and hard code the value of drop down and automatically call the function which will query the database on the basis of this hard coded value. Those other retrieved values from db will be used in UI.
  JavaScript function is :</p>
  
  <pre><code>Behaviour.register({
  
      '#retailerSelect': function(select) {
  
          select.onchange = function() {
  
              if (getValue(select) == ""){
                  setValue('query(branch)', "");
                  setValue('query(store)', "");
                  setValue('query(terminalId)', "");
              }
              this.form.submit();
          }
      },
  </code></pre>
  
  <p>HTML drop down is :</p>
  
  <pre><code>&lt;td width="33%" align="center" &gt;
              &lt;payo:layout columns="1"&gt;
                  &lt;payo:cell nowrap="nowrap" align="center"&gt;
  
                      &lt;html:select styleId="retailerSelect" style="margin:2px" property="query(retailer)"&gt;
                      &lt;html:option value="1"&gt;&lt;bean:message key="tms.dropdown.select.retailer"/&gt;&lt;/html:option&gt;
  
                          &lt;c:forEach var="retailer" items="${retailers}"&gt;
                              &lt;html:option value="${retailer.id}"&gt;${retailer.retailerName}&lt;/html:option&gt;
                          &lt;/c:forEach&gt; 
  
                      &lt;/html:select&gt;
                  &lt;/payo:cell&gt;
              &lt;/payo:layout&gt;
          &lt;/td&gt; 
  </code></pre>
  
  <p>I need the value of drop down as 1, which will automatically call this onchange function to query the db.</p>
  
  <p>please help,thanks in advance.</p>