Hi,
I tried posting this problem in the ASP.NET forum but didn't really have any luck there.
I've attached some JavaScript code to the onChange event of a textbox that will check if a valid date has been entered. If the date is valid, then I want the corresponding VB.NET OnTextChanged event to be called. I'd thought that simply having my JavaScript return either 'true' or 'false' would handle this, but it turns out that my VB.NET event never gets called. It only seems to work if I remove the 'return' statements, which I don't want to do as I only want the OnTextChanged event to run if it's a valid date.
Here is the relevant code:
Thx.
I tried posting this problem in the ASP.NET forum but didn't really have any luck there.
I've attached some JavaScript code to the onChange event of a textbox that will check if a valid date has been entered. If the date is valid, then I want the corresponding VB.NET OnTextChanged event to be called. I'd thought that simply having my JavaScript return either 'true' or 'false' would handle this, but it turns out that my VB.NET event never gets called. It only seems to work if I remove the 'return' statements, which I don't want to do as I only want the OnTextChanged event to run if it's a valid date.
Here is the relevant code:
Code:
leaveDateTextBox.Attributes.Add("onChange", "if (verifyDate(" + leaveDateTextBox.ClientID + ")) {flagAsChanged(" + rowChangedHiddenField.ClientID + "); return true;} else {return false;}")
Thx.