javascript - Handle submit of a form that inside of a included jsp with jQuery? -


i use:

... $('#form').submit(function(e) { ... <div id="list">   <jsp:include page="list.jsp" />   //form here </div> ... 

to handle form's submit , works. can handle form's submit.

however moved form list.jsp think can't recognize inside of jsp file can't handle form's submit. want ability within list.jsp too.

what should do?

based on code provided, looks trying attach event form before it's rendered. wrap event binding in onready function.

$(function(){    $("#form").submit(function() {         ...     }); }); 

if doing, make sure form rendered jsp include has id="form".


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -