I'm Trying To Activate doSearch() via onClick
<p>I've been on this code for the better part of about an hour (after typing the code) trying to figure out why my doSearch() command in my script doesn't want to activate. Any help you guys can offer would be appreciated.</p>

<p>Here's the script I've got:</p>

<pre><code>&lt;script type="text/javascript"&gt;
/* &lt;![CDATA[ */
    function doSearch() {
        var selectedItem = document.searchForm.engines
            .selectedIndex;
        if (selectedItem == -1)
            window.alert("You must select a
                search engine.");
        else
            location.href = document.searchForm.engines
               .option[selectedItem].value
               + document.searchForm.searchTerm.value;
    }
/* ]]&gt; */
&lt;/script&gt;
</code></pre>

<p>...And here is the button command I've got:</p>

<pre><code>    &lt;input type = "button" value="Search" 
    onclick = "doSearch()" /&gt;&lt;/p&gt;
</code></pre>

<p>Is there something I have missed? :/</p>
