reset button is getting fired 2nd time
-
hi, I have a problem regarding the reset button on my aspx page. A brief description. I have aspx page on which over 10 text boxes are there with a save and reset button. when I have clicked on the reset button it should clear all values in the text boxes. it is doing the same, but when I click the "Reset" Button second time. I think I made a mistake on the page load while calling the javascript funtions. txtCNumber.Attributes.Add("onKeyPress", "javascript:return Integersonly_special(this, event);"); txtMNumber.Attributes.Add("onKeyPress", "javascript:return Integersonly_space(this, event);"); txtFName.Attributes.Add("onKeyPress", "javascript:return Alphabitsonly_space(this, event);"); txtLName.Attributes.Add("onKeyPress", "javascript:return Alphabits_and_nospace(this, event);"); txtEmpId.Attributes.Add("onKeyPress", "javascript:return Alphabits_and_integers(this, event);"); txtRemarks.Attributes.Add("onKeyPress", "javascript:return Remarks(this, event);"); I have doubt using this Attributes concept. Can any body help me regading this.
your peter
modified on Friday, November 21, 2008 8:57 AM
-
hi, I have a problem regarding the reset button on my aspx page. A brief description. I have aspx page on which over 10 text boxes are there with a save and reset button. when I have clicked on the reset button it should clear all values in the text boxes. it is doing the same, but when I click the "Reset" Button second time. I think I made a mistake on the page load while calling the javascript funtions. txtCNumber.Attributes.Add("onKeyPress", "javascript:return Integersonly_special(this, event);"); txtMNumber.Attributes.Add("onKeyPress", "javascript:return Integersonly_space(this, event);"); txtFName.Attributes.Add("onKeyPress", "javascript:return Alphabitsonly_space(this, event);"); txtLName.Attributes.Add("onKeyPress", "javascript:return Alphabits_and_nospace(this, event);"); txtEmpId.Attributes.Add("onKeyPress", "javascript:return Alphabits_and_integers(this, event);"); txtRemarks.Attributes.Add("onKeyPress", "javascript:return Remarks(this, event);"); I have doubt using this Attributes concept. Can any body help me regading this.
your peter
modified on Friday, November 21, 2008 8:57 AM
Hi peter, There seems to be no problem with Attributes.Add and any ways events are getting fired on KeyPress so if at all they have any problem it will be evident when u enter any value in textboxes. Are u firing any JavaScript on Reset button , Please check if you are doing so,also debug the code on first click of Reset to check what happens . Regards Nishant