jsp - Unable to find form Variable using Jquery append -


we using jquery ".append" methods show more records (pagination) while scrolling shown below:

$.get(url,function(data){         $(".daily_list").append(data); }  }); 

now pagination working fine when trying access form variable of appended content getting below error message:

"error: unable property 'value' of undefined or null reference"

though able access parent form variables (before scrolling) . when access "view source" of page, unable find out appended content.

please suggest how can access form variable of appended content make part of original form.

let me describe again here:
our parent form :

<html:form action="searchcollegeresult.do" method="post" styleid="formlist" enctype="multipart/form-data"> 

the text area elements sitting within form opening , closing tags , looks like:

  <div class="daily_list">     <html:textarea property="commentbodytxt" rows= "8" cols ="62"> </html:textarea>     <html:button property="submit"  onclick='<%= "javascript:savecomment(" + updateid +","+dailycounter + ")"%>' >submit</html:button>     </div>     </html:form> 

implemented pagination shown below:
1. appending content on div segment shown below $('.daily_list').append(data). not working
2. try append content on form $('#formlist').append(data). not working

<script> $(window).scroll(function() { /* *   if nothing loading right , scroll has reached bottom of page *   load data backend , set loading = true */ if (isloading==false && $(window).scrolltop() >= $(document).height() - $(window).height()-$("#footer").height()) { //set loading true // [you can display loading image or want]  if (dailyupdateresultcounterindex >=dailyupdateresultcount) {  $(".nomorerecord").show(); $(".loadingmore").hide(); $(".loadingtext").hide();  }else {  isloading=true; $(".loadingtext").show();  //url more data needs fetched //you can add custom parameters var url="/dailyupdatelistloding.do?mode=few&page="+pagenumber;  $.get(url,function(data){   $('.daily_list').append(data); isloading=false; $(".loadingtext").hide();  //add more results results+=recordsperrequest; dailyupdateresultcounterindex+=recordsperrequest;  if(results%max_records==0){ isloading = true; $(".loadingtext").hide(); $(".loadingmore").show(); } });  }  } }); </script> 

dailyupdatelistloding.do having following content:

<html:form action="searchcollegeresult.do" method="post" enctype="multipart/form-data">  <html:textarea property="commentbodytxt" rows= "8" cols ="62"> </html:textarea>     <html:button property="submit"  onclick='<%= "javascript:savecomment(" + updateid +","+dailycounter + ")"%>' >submit</html:button>  </html:form> 

now able print parent form variable (on submit)but unable access content appending through jquery.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -