javascript - JS Statement for Client Side Alert in .aspx.vb -
i new hard coding & vs. have created couple applications using .aspx beginning understand little more.
i have form (.aspx) has yes/no dropdown box, if user selects yes, it's necessary populate following empty text box (textbox13 "reason/comment"). , need add client side alert message (using js, have found answer) have tried using samples have found. problem is, none of examples need.
so far, did create .js page:
$('#mp_form').submit(function(e) { if(!$.trim($(this).find('textbox13'="text"').val()).length){ e.preventdefault(); alert('if critical, must provide reason/comment.'); } }); }
i added in master page, , understand need statement in aspx.vb page function. think onsubmit want not sure how write if, statement. can please me out?
thanks! kathy
have @ following jsfiddle. there's input , button. text in input use following:
$('#inputid').val();
in case inputid comment, in case it's $('#comment').val();
Comments
Post a Comment