Keep value of input which is generated by Javascript after submitting
<p>I have this code to append the input panel <code>#yearPanel</code> after the select box <code>#before</code> changed.</p>

<pre><code>$("#before").change(function() {
    var selected = $('#before option:selected').text();

    if(selected == bankShowYear) {
        $(yearPanel).insertAfter("#yearAnchor");
        var value = $("#yearHiden").val();
        $("#year").val(value);
    } else {
        $("#yearPanel").remove();
    }
});
</code></pre>

<p>I want to keep the input value of <code>#year</code> in <code>#yearPanel</code> after submitting by PHP. I tried to store the value in <code>#yearHidden</code> and assign it to <code>#year</code> after all the input are rendered but it doesn't work.</p>

<p>How to keep the input value?</p>
