Javascript Error Message
<p>In my shop, there are some orders without option selected(Bypassing javascript alert) on some web browser.
what's the best javascript to reponse to various web browser include IE 9.</p>

<p>Here is Code.</p>

<p><strong>JS</strong> </p>

<pre><code>     function doCart() {
        if ( document.form1.opt1 != null &amp;&amp; document.form1.opt1.value == "" ) {
            alert("Please Select Options");
        } else if ( document.form1.opt2 != null &amp;&amp; document.form1.opt2.value == "" ) {
            alert("Please Select Options");
        } else if ( document.form1.opt3 != null &amp;&amp; document.form1.opt3.value == "" ) {
            alert("Please Select Options");
        } else {
            document.form1.action = "/order/cartaction.jsp";
            document.form1.submit();
        }
     }
</code></pre>

<p><strong>HTML</strong></p>

<pre><code>      &lt;TABLE id="detail" cellpadding=3&gt;
        &lt;TR&gt;
            &lt;TD width=110  class="atitle"&gt;Size/Color&lt;/TD&gt;
            &lt;TD style="LETTER-SPACING: -1px" align="left"&gt;
                &lt;select name="opt1" class="select_detail"&gt;
                    &lt;option&gt;Size/Color&lt;/option&gt;
                    &lt;option&gt;--------&lt;/option&gt;
                    &lt;option value="BLACK/34A"&gt;BLACK/34A&lt;/option&gt;
                    &lt;option value="BLACK/34B"&gt;BLACK/34B&lt;/option&gt;                                    
                &lt;/select&gt;
            &lt;/TD&gt;
        &lt;/TR&gt;

        &lt;TR&gt;
            &lt;TD class="atitle"&gt;Bottom&lt;/TD&gt;
            &lt;TD style="LETTER-SPACING: 1px" align="left"&gt;
                &lt;select name="opt2" class="select_detail"&gt;
                    &lt;option&gt;Bottom&lt;/option&gt;
                    &lt;option value="Black/S"&gt;Black/S&lt;/option&gt;
                    &lt;option value="Almond/S"&gt;Almond/S&lt;/option&gt;                                           
                &lt;/select&gt;
            &lt;/TD&gt;
        &lt;/TR&gt;
    &lt;/TABLE&gt;

    &lt;a href="javascript:doCart();"&gt;&lt;img src="/images/list/doCart.gif"&gt;&lt;/a&gt;
</code></pre>
