I Want to submit a form to a popup window (not blank). This works fine but for some reason my parentwindow is opened for a 2nd time.
 var formelements = document.getElementById("exportform");
 formelements.removeAttribute("action");
 formelements.setAttribute("target","/path/exportwindow.html");
 exportwindow = window.open("/path/exportwindow.html", "myexportwindow", "width=800,height=600,resizable=yes");                                         
 formelements.submit();
HTML:
<form id="exportform" action="/path/myfunction" method="post">
So what happens is that the popup window opens and in the background my parent window is opened to a new tab. Can anyone tell me why js is behaving like this?
 
    