Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery dynamically added form element data not sent to database when user is on intranet
    text
    copied!<p>I have an interesting problem. I built a form for runners to sign up for a race. The form allows the user to add multiple runners and sign them all up at once. The additional runner functionality is programmed using jQuery. </p> <p>Here is the jQuery that adds additional runners...</p> <pre><code>&lt;script type="text/javascript"&gt; var current= 1; $(document).ready(function() { $("#addrunner").click(function() { current++; $newrunner= $("#runnerTemplate").clone(true).removeAttr("id").prop("id", "fieldSet" + current).insertBefore("#runnerTemplate"); $newrunner.find("input").each(function(i) { var $currentElem= $(this); $currentElem.prop("name",$currentElem.prop("name")+current); $currentElem.prop("id",$currentElem.prop("id")+current); }); $newrunner.find("select").each(function(i) { var $currentElem= $(this); $currentElem.prop("name",$currentElem.prop("name")+current); $currentElem.prop("id",$currentElem.prop("id")+current); }); var f = $("#fieldSet"+current); f.html(f.html().replace("fieldSetID", "fieldSet"+current)); $newrunner.appendTo("#mainField"); $newrunner.removeClass("hideElement"); var prevvalue=$("#count").prop("value"); $("#count").prop("value",prevvalue+","+current); }); }); &lt;/script&gt; </code></pre> <p>The form is a basic html form. </p> <p>The form works as intended unless the user is on an Intranet. If the user is on an intranet, the form will only submit the first runner; The data for all of the additional runners that are added via jQuery is not transferred upon submission. This is what confuses me. Working here at home, it works perfectly without a problem. But, a client that uses it from his office on an Intranet, the first runner works, but the additional runners added do not.</p> <p>Any help would be welcomed. Thank you.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload