R
rockdale
Hi, All
I have a textbox for user to input SSN, I havea javascript to format
what he input to SSN format, I also have a onChange postback function
to retrieve other info based on the SSN.
<asp:TextBox id="txtSSN" runat="server" AutoPostBack="true"
onKeyDown="javascript:myJavaFunction"></asp:TextBox>
in code behind
protected void SSN_OnTextChanged(object sender, System.EventArgs e)
{
//do database query
}
The OnTextChanged event triggered correct if I do not have the
OnKeyDown Javascript. But if I put the onKeyDown javascript. then the
OnTextChanged event won't get triggered.
Can I put both JavaScript and postback function on one control? If so,
what I did wrong or is there another work around?
Thanks a lot
-Rockdale
I have a textbox for user to input SSN, I havea javascript to format
what he input to SSN format, I also have a onChange postback function
to retrieve other info based on the SSN.
<asp:TextBox id="txtSSN" runat="server" AutoPostBack="true"
onKeyDown="javascript:myJavaFunction"></asp:TextBox>
in code behind
protected void SSN_OnTextChanged(object sender, System.EventArgs e)
{
//do database query
}
The OnTextChanged event triggered correct if I do not have the
OnKeyDown Javascript. But if I put the onKeyDown javascript. then the
OnTextChanged event won't get triggered.
Can I put both JavaScript and postback function on one control? If so,
what I did wrong or is there another work around?
Thanks a lot
-Rockdale