Javascript alert not getting displayed
<p>I have a form with a text box (Name) and a dropdown (Hotel).</p>

<pre><code>&lt;input type="text" name="lname" runat="server" id="LName" tabindex="1" onblur="if(this.value == '&amp;nbsp;') { this.value = '&amp;nbsp;Name'; }"
                            onfocus="if(this.value == '&amp;nbsp;Name') { this.value = '&amp;nbsp;'; }" value="&amp;nbsp;Name"
                            style="color: #000000; border: 1px solid #757575; width: 234px; margin-top: 5px;" /&gt;
                        &lt;div class="dropdownselect" style="margin: 15px 0;"&gt;
                            &lt;asp:DropDownList ID="drhotel" runat="server" Style="border: 1px solid #757575; width: 234px;
                                height: 16px; *height: 18px;"&gt;
                            &lt;/asp:DropDownList&gt;
</code></pre>

<p>If nothing is entered the text box will display "Name" by default.  I am trying to validate on client click using the method below:</p>

<pre><code> function validatecust() {
    if (document.getElementById('&lt;%= LName.ClientID %&gt;').value == '&amp;nbsp;Name') {
        alert('Please enter Name');
        document.getElementById('&lt;%= LName.ClientID %&gt;').focus();
        return false;
    }
    if (document.getElementById('&lt;%= drhotel.ClientID %&gt;').value == 'Select Hotel') {
        alert('Please select Hotel');
        document.getElementById('&lt;%= drhotel.ClientID %&gt;').focus();
        return false;
    }}
</code></pre>

<p><img src="http://i.stack.imgur.com/bNzgH.jpg" alt="enter image description here"><img src="http://i.stack.imgur.com/ox6HV.jpg" alt="enter image description here"></p>

<p>It is not showing alerting if I don't enter anything in the Name field.  The Hotel validation works fine.</p>
