Hi,
I have a main search results page, that causes a pop up window to popup. DB data is updated in this Pop-up. I want the main results page to update with the new information.

I am using the code

echo"<SCRIPT LANGUAGE=\"JavaScript\">\n";
echo "if(!window.opener.closed)\n";
echo "{\n";
echo "window.opener.location.reload();\n";
echo "}\n";
echo "window.close();\n";
echo"</SCRIPT>\n";

which works, but it pops up a little warning box stating

"The page cannot be refreshed without resending the information.
Click Retry to send the information again, or click cancel to return to the page that you were
trying to view."

Is there any way around this little warning box to update the main screen without asking the user if he/she wants to.

Thanks,
Adrian

    This has worked for me in the past:

    
    html_meta_redirect( '', 60 );
    
    

      Will this work when trying to refresh another window, namely the parent window ??

      The pop-up is trying to refresh the main window.

      THanks,
      Adrian.

        This should just refresh whatever window you put it in as it is only refreshing that file.. I have the example set at 60 seconds, though you can change that.

          Where exactly did you get html_meta_redirect() from ?

            thanks for the reminder shrike🙂 I am a bit out of it this morning..

            	function html_meta_redirect( $p_url, $p_time=null ) {
            
            	echo "<meta http-equiv=\"Refresh\" content=\"$p_time;URL=$p_url\" />";
            
            	return true;
            }
            
            
              Write a Reply...