html - JQuery loop through checked boxes and populate div -


<div id="termsheetpopup">     <input type="checkbox" name="summaryinformation">summary information<br />     <input type="checkbox" name="swaplegs">swap legs<br />     <input type="checkbox" name="amortizationoptions">amortization options<br />     <input type="checkbox" name="economicresults">economic results<br />     <input type="checkbox" name="amortizationschedule">amortization schedule </div>  <div id="printing">  </div> 

so looking @ above code, termsheetpopup div turn jquery dialog. when user clicks dialog 'generate' button, want jquery tell me names of of checkboxes checked (the name element of them), can use names populate div printing. each of names correspond partial view want render within div.

also, if have time, how render partial view dynamically using jquery, similar how on page within asp.net this:

<% html.renderpartial("~/views/indications/amortizationschedule.aspx", model.trx); %> 

how this?

thanks!

var myarray = []; $('#termsheetpopup input').is(':checked').each(function(){       myarray.push( $(this).attr('name') ); }); 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -