RadTextBox textchanged event is firing before i finish typing the text in the textbox.
SO i am trying to use onblur clientside event. After user types the text there is some server side db call will be made.
How to accomplish this?
My code:
<telerik:RadTextBox ID="txtPurchaseOrder" AutoPostBack="true" runat="server" EmptyMessage="" MaxLength="30" style="text-transform: uppercase;" >
<ClientEvents OnKeyPress="OnKeyPress" OnBlur="Blur" />
</telerik:RadTextBox>
function Blur(sender, eventArgs) {
//Need to call server side method POChange() from here, PageMethods.POChange(); not working
}
code-behind:
protected void POChange()
{
if (txtPurchaseOrder.Text != "")
{
string strSoOrder = BookingData.CheckPONumer(txtPurchaseOrder.Text);
if (strSoOrder != null || strSoOrder != "")
{
txtPurchaseOrder.Attributes.Add("onblur", "javascript:return confirm('The Purchase Order used is the same used on previous SO# do you want to continue?');");
}
}
}
SO i am trying to use onblur clientside event. After user types the text there is some server side db call will be made.
How to accomplish this?
My code:
<telerik:RadTextBox ID="txtPurchaseOrder" AutoPostBack="true" runat="server" EmptyMessage="" MaxLength="30" style="text-transform: uppercase;" >
<ClientEvents OnKeyPress="OnKeyPress" OnBlur="Blur" />
</telerik:RadTextBox>
function Blur(sender, eventArgs) {
//Need to call server side method POChange() from here, PageMethods.POChange(); not working
}
code-behind:
protected void POChange()
{
if (txtPurchaseOrder.Text != "")
{
string strSoOrder = BookingData.CheckPONumer(txtPurchaseOrder.Text);
if (strSoOrder != null || strSoOrder != "")
{
txtPurchaseOrder.Attributes.Add("onblur", "javascript:return confirm('The Purchase Order used is the same used on previous SO# do you want to continue?');");
}
}
}