Hi,
I am having problem in changing the color of the radtextbox at the client side,
the color changes only after the control gets the focous, but i want it to happen immediately as soon as i click on the button.
below is the code, kindly advise
I am having problem in changing the color of the radtextbox at the client side,
the color changes only after the control gets the focous, but i want it to happen immediately as soon as i click on the button.
below is the code, kindly advise
<script language="javascript" type="text/javascript">
function validate()
{
var name = $find("<%= radtxtLastName.ClientID %>");
var name1= document.getElementById('radtxtFirstName');
alert(name1.value);
name1.style.background =
"red";
if(name.get_value()=="")
{
name.get_styles().EnabledStyle[0] =
"background-color: Red;";
return false;
}
return true;
}
</script>
<telerik:RadTextBox ID="radtxtLastName" runat="server" Width="250px" MaxLength="50" skin="Office2007"/>
<asp:TextBox ID="radtxtFirstName" runat="server" Width="250px" MaxLength="50"></asp:TextBox>
<asp:ImageButton ID="btnChange" ImageUrl="~/Images/btn_ok.gif" runat="server" OnClientClick="return validate()" />
Regards,
Santhosh