Klapsius Klapsius - 1 year ago 101
PHP Question

How to submit HTML multiple forms generated by jQuery

On ajax success i have list of generated forms:

success: function (data) {
$el.append('<form method="POST" class="submit_form">Name: '+data[i].namen+'
Id: '+data[i].id+'<br> SomethignElse: <label id="red">'+data[i].se+'</label><br> SomethingElse2: '+data[i].se2+'
<input type="text" name="id" value="'+data[i].id+'" id="id_test" />
<input type="button" class="submit_button1" value="Add"/></form><br>');
i = ++ i;

Also i have a click functionto submit this forms/form:

//do something

but nothing happens on click. Is it possible to submit in this way?

Answer Source

Please try .on('click' event listner.

    //do something
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download