Hi I am struggling to find an answer to this, if it can be done?
An entry form containing 3 text boxes: User ID, post code, date of birth
User ID is OK, I can add a required attribute to validate, but I It was to agree that he also entered the data in 1 other 2 text boxes, so either postcode or date of birth. I do not want to use asp.net custom variants because they have a pain, and hoping that this can be done in html5 / jquery These text boxes are on a pure user control, so I'm sure if this is a The problem is, as I have trouble finding out the form with it if I use something ... $ ("# form1"). You may have to use client control client ID to access them in JavaScript.
You can force Javascript by clicking on the submit button and any verification can be done.
$ ('# & lt;% = submitButton.ClientID% & gt;'). Click (function () {textBox1Value = $ ('# & lt;% = textbox1.ClientID% & gt;') .val (); textBox2Value = $ ('# & lt;% = textbox2.ClientID% & gt; '). Val (); // Verify here both text boxes if (! ConditionFormValidated) failed return false;});
Comments
Post a Comment