Response title
This is preview!
Object | ASP.NET ID | HTML | Type | HTML ID | |
Formview | fvAdd | table | fvAdd | ||
Textbox | txSite_i | input | text | txtSite_i | |
Checkbox | cbActive_i | input | checkbox | cbActive_i | |
Linkbutton | InsertButton | a | InsertButton | ||
Linkbutton | InsertCancelButton | a | InsertCancelButton |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head><title> | |
</title> | |
<style type="text/css"> | |
h1 | |
{ | |
font-size:larger; | |
} | |
h1, h2, h3 | |
{ | |
font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande", "Lucida Sans Unicode", Geneva, Verdana, sans-serif; | |
} | |
.Formview_Border | |
{ | |
border: thin solid #808000; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Test Jquery Formview Validation</h1> | |
<form method="post" action="Test2.aspx" id="form1"> | |
<div class="aspNetHidden"> | |
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /> | |
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /> | |
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="l+nwVkDm+bdoz58RUlKFff6f09rmaXsRVGz5eboqsMK5kkL+GWdnrHQwfdjiLIryhvCOLeTelhhEAjJm3GWDjdhK4Ne6NGbhM8/2ZpGUFQ5c75gogbLLwpZQ5YYYSDDckbWO4cCrLnlQRKm28FhxrXn0rsVXD460ZGDPhaqyPwSq39cj4881cE1dvL1iG0ogD2XnrlBMYZ4F81r/aoQe2W3gMNke6ptQ7Miinn3anyXrTuvfE1QtHBXNqzOXebTINGtw4X7KEz/Fy2EcRCVtJ7G8esyNYdfsMXkSFUyprLgCVrpPDnrfHPsEKHymGgXeDDtkEdTsHCdyFcMvfytrEA==" /> | |
</div> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
var theForm = document.forms['form1']; | |
if (!theForm) { | |
theForm = document.form1; | |
} | |
function __doPostBack(eventTarget, eventArgument) { | |
if (!theForm.onsubmit || (theForm.onsubmit() != false)) { | |
theForm.__EVENTTARGET.value = eventTarget; | |
theForm.__EVENTARGUMENT.value = eventArgument; | |
theForm.submit(); | |
} | |
} | |
//]]> | |
</script> | |
<script src="/WebResource.axd?d=aG_YbECBdL214aFy5otpoQS5_i0I_QvEVl9IihMmHVR8I0ulj7R-0Nawcvh0eTHcjN8GbGwabwfyiqALb_5n_7osMzCffAShCAFpJbyXpuo1&t=635307087448997306" type="text/javascript"></script> | |
<div class="aspNetHidden"> | |
<input type="hidden" name="__SCROLLPOSITIONX" id="__SCROLLPOSITIONX" value="0" /> | |
<input type="hidden" name="__SCROLLPOSITIONY" id="__SCROLLPOSITIONY" value="0" /> | |
<input type="hidden" name="__VIEWSTATEENCRYPTED" id="__VIEWSTATEENCRYPTED" value="" /> | |
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="IWdnBTUN6OYAh3sTJ7cAQSEdUqpB7HfyGcLbEePNMxl3fGg5lgzQWku+nGE24ALijYEwGiVIZj18TtCB89zU2a+vuu2wP3U6A5hBGuX9vOJY9FIdx3CHftT+7WL8tZfJLxSXv2qkJFpvTByTR8EACmGK35jUUPbhosU3xGNjLnC2YA/ovlAU/+8NoHHFBZ5YMx2t1637+Pv0Vz6pyR9uVA==" /> | |
</div> | |
<table class="Formview_Border" cellspacing="0" id="fvAdd" style="border-collapse:collapse;"> | |
<tr> | |
<td colspan="2"> | |
Category: | |
<input name="fvAdd$txtCategory_i" type="text" id="txtCategory_i" /> | |
<br /> | |
Active: | |
<input id="cbActive_i" type="checkbox" name="fvAdd$cbActive_i" /> | |
<br /> | |
<a id="InsertButton" href="javascript:__doPostBack('fvAdd$InsertButton','')">Insert</a> | |
<a id="InsertCancelButton" href="javascript:__doPostBack('fvAdd$InsertCancelButton','')">Cancel</a> | |
</td> | |
</tr> | |
</table> | |
<div> | |
</div> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
theForm.oldSubmit = theForm.submit; | |
theForm.submit = WebForm_SaveScrollPositionSubmit; | |
theForm.oldOnSubmit = theForm.onsubmit; | |
theForm.onsubmit = WebForm_SaveScrollPositionOnSubmit; | |
//]]> | |
</script> | |
</form> | |
</body> | |
</html> | |
What's this, then?Reading about the jquery validator itself from other sources, I see that it is designed to validateforms, whereas my formview is a table
I don't know what you mean by "using the form name" and "using the formview name". Explain. Show some code. It's hard to help with specific problems when all we get is abstract descriptions of what the developer tried, without any code.I tried validating using the form name and using the formview name. In neither case did the function trigger.
© 2013 jQuery Foundation
Sponsored by and others.