Sorry but I don’t know how to ask this better.
This is my main page:

when I select the “New Element” option from the select element, a popup window (or whatever is named) should open:

After the form is completed, the submit button should perfom a POST to the server in order to insert a new element
in the Data Base, the popup window should close automatically and the dropdown list must be selected in the newest inserted element

THE POPUP WINDOW IS NOT PART OF THE DOM of the main page.
How could I do this in jQuery? The popup window is a web page that will have to be loaded some how. I guess that I should
do a jQuery.post() to send the data from the popup window to the server.
Thanks in advance!
You can use
window.open()for this, and usequerystringsto populate your popUp window.So your select box would look something like this:
Then your
popUp()function would look like this:I would use some sort of server side language on
mypopupwindow.php, otherwise you would need to use javascript to read the querystrings in the url to populate your text box.