pedroemarques
Technical User
Hello! My first post
I have a page that lauches a popup windows:
On that popup I ask the user to choose from a list of options and i change a form field value in the first window:
what I want to do is to close this popup, open another one automatically and repeat the process a second time. I tried something like this after the code above:
it seems to work, but one the second popup i lost the opener reference to the first window and it does't write the second form field value:
I really need the second popup automatically, and not from the main window, because the second page is a php mysql statement that makes a select based on the first popup result.
Please help me....

I have a page that lauches a popup windows:
Code:
<a href="javascript:;" onclick="window.open('popup.php','','width=190,height=380');">
On that popup I ask the user to choose from a list of options and i change a form field value in the first window:
Code:
<script type="text/javascript">
<<!--
function selecionar(value) {
window.opener.document.form.field.value=value;
what I want to do is to close this popup, open another one automatically and repeat the process a second time. I tried something like this after the code above:
Code:
window.open('popup2.php','','width=190,height=380');
self.close();}
//-->
</script>
it seems to work, but one the second popup i lost the opener reference to the first window and it does't write the second form field value:
Code:
<script type="text/javascript">
<!--
function selecionar(value) {
window.opener.opener.document.formfield.value=value;
self.close();}
//-->
</script>
I really need the second popup automatically, and not from the main window, because the second page is a php mysql statement that makes a select based on the first popup result.
Please help me....