First thing I noticed, you need to set the "action" attribute on the FORM element. Not "target" - which is probably whats causing the new window to get spawned.
You also may need to add the newly created IFRAME to your DOM somewhere. For now, just try adding it the BODY via something like "document.body.appendChild(iframe)".
And eventually, you'll want to make it hidden.
Jiggy, there's some basic HTML concepts here that I think you need to learn before tackling such a problem like this. Unfortunately, this is beyond the scope of how much I can help you.
I hope this was enough to help push you forward. |