I got problem with window.opener, basicly this works but, after submit (popup.php), foo.php submit's twice -->second submit goes to index.php?var=1&var=2...
<script>
//index.php?template=popup.php
the_page = index.php?template=foo.php
the_result = "1,2,3"
function BackToForm(theResult)
{
the_page = window.opener.location;
window.opener.document.form1.CSareas.value = theResult;
window.opener.document.form1.action = the_page;
window.opener.document.form1.submit();
window.opener.focus();
window.close();
}
</script>
any idea what i'm doing wrong?