Call java method from javascript
<p>I have a web jsp web application. In one page I need two dropdownlist. When I will  select a value from dd1 then second dropdown will be fill according this value. How I can call java function from dropdown 1 change event in javascript or jqury? I got example but that is calling jsp page but I need to java method and send parameter what i got from dropdown1 
following is my dropdown dd1. So If i select tom i have to related information of tom in dd2. </p>

<pre><code>            &lt;td&gt;
              &lt;select  id="dd1"&gt;
                    &lt;option value="1"&gt;john&lt;/option&gt;
                    &lt;option value="2"&gt;Tom&lt;/option&gt;
              &lt;/select&gt;

          &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt; Projects &lt;/th&gt;
          &lt;td&gt;

              &lt;select id="dd2"&gt;
                    &lt;option value="1"&gt;pp1&lt;/option&gt;
                    &lt;option value="2"&gt;pp2&lt;/option&gt;
              &lt;/select&gt;

          &lt;/td&gt;
</code></pre>

<p>I have following code </p>

<pre><code>$(function () {
    var ddVal = '';
    var dropdown = document.getElementById("dd1")
    $(dropdown).focus(function () {
        ddVal = $(this).val();
        }).blur(function () {
        if (ddVal == $(this).val()) {
            $(this).change();
        }
    }).change (function () {

});
</code></pre>

<p>for change event of dd1. but I don't know how to call java method from jquery. </p>

<p>in my application i have a java class where there is amethod which return list that I need to load in dd2 dropdown.</p>

<p>can anyone help me regarding this issue?</p>
