javascript - Ignoring Validators -
i have page use javascript
, <input>
button hide ability add new user database. ensure people enter in accurate info, have added validators works great. issue, have gridview
, search facility on page , because use javascript
hide it, no click events trigger because textboxes attached validators don't have correct data in them. there way ignore validation unless above button has been clicked?
i wrote , had crack @ google. issue add causesvalidation="false"
asp:button
control worked, using html generate add user button
instead of asp.net
. since using jqueryui
, found easier search how change <input>
<asp:button>
controls did changing javascript from:
$("#button").click(function () {
to:
$("input[id$='addbutton']").click(function () {
if understand correctly, <asp:button>
rendered html input[id=...
etc. adding in $
meant that script applied <asp:button>
ended in addbutton
. needed since had few search buttons on page hidden in other views
, still wanted consistent naming structure on page. alternative use ^
symbol instead apply script addbutton
@ start of id
.
Comments
Post a Comment