wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Submit dynamically created form with jQuery Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Submit dynamically created form with jQuery" Watch "Submit dynamically created form with jQuery" New topic

Submit dynamically created form with jQuery

Yoke Lee

Joined: Mar 09, 2011
Posts: 3
Hi all

I've been trying to achieve this for several hours but to avail. Hope I can find enlightenment here....

I am trying to make a dynamically form created by jquery in div element in a.php , submit to b.php, then return the result the same div in a.php

So far this is my code


When I click the a#igniter, it will populate the div panel with a form. I managed it with this piece of code.

With this i have a form (id="group_edit") in div panel in a.php. Great! But, whenever i submit, the whole page goes to b.php instead of the div....

tried this code as well:

but seems like it just never goes there.....

I tried the solutions here:

but doesn't work for me....

Please help me.... thanks.....
Yoke Lee

Joined: Mar 09, 2011
Posts: 3
Actually........... I solved it.

This is the final code that works:

Hope it helps any other who needs. Cheers
Jeanna Wheeler

Joined: May 12, 2011
Posts: 1
I was hoping you might be able to help me out. I am pretty new to coding, but I am using a php/ajax script to dynamically load my drop down menus from a mySQL db.
Here is the code I'm using.

Is it possible to use something similar to what you've got to submit my results into my Results div instead of a separate page?

Consider Paul's rocket mass heater.
subject: Submit dynamically created form with jQuery
Similar Threads
My form submit is called twice
change event is firing twice
Replacing Element Body with jQuery.load(), What Happens To Old Elements?
jQuery UI tabs not loading in the same tab
jQuery AJAX display issue