javascript drop-down filling
<p>I am populating my dropdown through javascript using ASP.NET, and for that I have taken the help of one of the answers on this site. I used the following code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function () {
        alert("Hi");
        var select = document.getElementById('&lt;%=ddlItems%&gt;');
        var option = document.createElement("option");
        option.value = "1";
        option.innerHTML = "Option1";
        select.appendChild(option);

    });
&lt;/script&gt;
</code></pre>

<p>It's not working. For checking whether the program flow is entering function, I have put an alert box. It's showing me the proper alert, which means its entering the function but below that code is not working. What may be the problem?</p>
