I am new to html and javascript, and what I want to do is have a link that users can click on and open a new window, fill out a form that will be in the new window, and when the form is completed and the info is sent, have that new window close auotmatically and have the main window refresh with a message letting users know the info was sent and thanking them for filling out the form.

Does anyone know the javascript codes for this?
Thanks