Comparing text field and Selection List value and alert
<p>I have a text field in which value gets populated when screen loads and also have a selection list.</p>

<p>My question is when user selects a value in Selection List and compares with the text field and trigger an alert message if its not equal.</p>

<p>Please help!</p>

<pre><code>    JS:
function doType() 
{
    if (document.getElementById("Text1").value != document.getElementById("Select1").value) 
    alert(document.getElementById("Select1").value)
}

HTML:
&lt;tr&gt;
        &lt;td align="right"&gt;&lt;b&gt;Select 1:&lt;/b&gt;&lt;/td&gt;
        &lt;td align=left&gt;
           &lt;select name="Select1" onChange="doType();"&gt;&lt;/select&gt;
        &lt;/td&gt;
        &lt;td align="right"&gt;&lt;b&gt; Text 1:&lt;/b&gt;&lt;/td&gt;
        &lt;td align="left"&gt;
            &lt;input name="Text1" type="text" size="10" maxlength="10"&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
</code></pre>
