ranjan sahoo

ranjan sahoo

  • NA
  • 311
  • 272.7k

javascript

Sep 16 2013 2:17 AM
hiiiiii  i want a validation  i have   one textbox and one dropdownlist like


<asp:TextBox ID="txtModule" runat="server"></asp:TextBox>
<asp:DropDownList ID="Emp_Status" runat="server">
                  <asp:ListItem Selected="True" Text="Present" Value="P"></asp:ListItem>
                    <asp:ListItem Text="Absent" Value="L"></asp:ListItem>
   </asp:DropDownList>


but  iwant a javacript validation . when i will submit button it will show an alert box
The condion is like that:-

if dropdowlist value is  P
alert('textbox should not blank')

 if dropdowlist value is L
then alert will not show.


i want in javascript. how i will do plz give me solution

Answers (10)