How do I reload a parent window that is part of a cgi script that has a query string?
I have a script that shows a record with images uploaded into a DB.
I have an image upload script (child window) which on close I would like it to refresh the parent window.
The issue is the parent window has a query string attached to the script name.
E.g.
I am using this code on the child window:
[CODE=javascript]
<SCRIPT language=JavaSc ript>
<!--
function win(){
window.opener.l ocation.href='' ;
self.close();
//-->
}
</SCRIPT>
[/CODE]
and this on the 'close' button of the child window:
[CODE=html]<input type='image' src='/shared/purple/done.gif' border='0' alt='done' width='56' height='24' onClick='win(); '>[/CODE]
I've tried using this:
[CODE=javascript]
<SCRIPT language=JavaSc ript>
<!--
function win(){
window.opener.l ocation.href='h ttp://www.mysite.org/cgi-bin/admintoy/dbedit_recccf.c gi/$ENV{QUERY_STRI NG}';
self.close();
//-->
}
</SCRIPT>
[/CODE]
It reloads the parent window but doesn't preserve the query string.
Is this possible?
thanks
I have a script that shows a record with images uploaded into a DB.
I have an image upload script (child window) which on close I would like it to refresh the parent window.
The issue is the parent window has a query string attached to the script name.
E.g.
Code:
http://www.mysite.org/cgi-bin/admintoy/dbedit_recccf.cgi?snumber=001&kit=BLOCK&id=BLOCK001&item_name=Bunny%20Builders&in_out=in&itemd_name=30%20Large%20molded%20plastic%20bunnies%20that%20fit%20together%20to%20make%20many%20things--good%20for%20older%20toddlers--young%20preschoolers&date_out=&date_in=&name_out=&staff_out=&photo=&staff_in=
[CODE=javascript]
<SCRIPT language=JavaSc ript>
<!--
function win(){
window.opener.l ocation.href='' ;
self.close();
//-->
}
</SCRIPT>
[/CODE]
and this on the 'close' button of the child window:
[CODE=html]<input type='image' src='/shared/purple/done.gif' border='0' alt='done' width='56' height='24' onClick='win(); '>[/CODE]
I've tried using this:
[CODE=javascript]
<SCRIPT language=JavaSc ript>
<!--
function win(){
window.opener.l ocation.href='h ttp://www.mysite.org/cgi-bin/admintoy/dbedit_recccf.c gi/$ENV{QUERY_STRI NG}';
self.close();
//-->
}
</SCRIPT>
[/CODE]
It reloads the parent window but doesn't preserve the query string.
Is this possible?
thanks
Comment