I haven't tried your code, but I'm thinking what's happening is that the browsers that the code isn't working in is stopping at the "returnwin=window.opener.navigate(urlLoc);" line - what happens if you change it to "returnwin=window.opener.location = urlLoc;" ??
----Original Message----- From: Carlos Fernando Scheidecker Antunes [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 3:02 PM To: PHP-GENERAL Subject: [PHP] Multiple JavaScript Windows with PHP Importance: High Hello all! I've wrote to scripts that use Javascript too. The idea is to have a parent window teste_popup.php4 and a child window pop.php4. When a link is clicked on the parent window, the child window will open. After the user enters information on the child window he must close it and that will update the parent window.possibility to me. But there's a little problem,though. The only browser that it works is MS IE. It does not work on Nestcape (Win or *NIX) or Konqueror (*NIX). If I try it on a different browser, say Netscape or Konqueror, when I click the main window to open the popup window it does work. The thing that does not work is when you click close on the popup window. It does not close the popup window and if I close the window it does not update the parent window. I've written two test PHP scripts teste_popup.php4 (the main window) and pop.php4 that I am including below. Maybe someone can help me out by pointing where it is wrong. teste_popup.php4 (parent window script) <?php // teste_popup.php4 print("<html>\n"); print("<head>\n"); //print("<script type=\"text/javascript\">\n"); print("<script language=\"JavaScript\"><!--\n"); print("function newWin(urlLoc) {\n"); print(" _winName=\"Janelateste\";\n"); print(" _info = \"toolbar=no\";\n"); print(" _info += \",location=no\";\n"); print(" _info += \",directories=no\";\n"); print(" _info += \",status=yes\";\n"); print(" _info += \",menubar=no\";\n"); print(" _info += \",scrollbars=yes\";\n"); print(" _info += \",resizable=yes\";\n"); print(" _info += \",titlebar=no\";\n"); print(" _info += \",dependent=no\";\n"); print(" _info += \",channelmode=no\";\n"); print(" _info += \",height=480\";\n"); print(" _info += \",width=640\";\n"); print(" _info += \",left=200\";\n"); print(" _info += \",top=100\";\n"); print(" DispWin=window.open(urlLoc,_winName,_info);\n"); print("} \n"); print("//--></script>\n"); print("</head>\n"); print("<body>\n"); print("<p>\n"); print("Esse e um teste usando Javascript para montar as janelas\n"); print("a parte de numero de operacoes, pecas, etc de garantia.\n"); print("</p>\n"); print("<b>\n"); print("Data : ".date(d."/".m."/".Y." ".H.":".i.":".s)."\n"); print("<b>\n"); print("<br>\n"); print("<br>\n"); print("<a href=\"JavaScript:newWin('pop.php4?oper=1');\">link</a>\n"); print("<br>\n"); print("</body>\n"); print("</html>\n"); ?> pop.php4 - child popup window <?php // pop.php4 print("<html>\n"); print("<head>\n"); //print("<script type=\"text/javascript\">\n"); print("<script language=\"JavaScript\"><!--\n"); print("self.menubar.visible=false\n"); print("self.tollbar.visible=false\n"); print("self.locationbar.visible=false\n"); print("self.personalbar.visible=false\n"); print("self.statusbar.visible=false\n"); print("function oldWin(urlLoc) {\n"); print(" returnwin=window.opener.navigate(urlLoc);\n"); print(" window.opener.focus();\n"); print(" window.close();\n"); print("} \n"); print("//--></script>\n"); print("</head>\n"); print("<body onunload=\"JavaScript:oldWin('teste_popup.php4?oper=1')\">\n"); print("<b>\n"); print("Child window\n"); print("</b>\n"); print("<br>\n"); print("Parametro oper = ".$HTTP_GET_VARS["oper"]."\n"); print("<br>\n"); print("<a href=\"JavaScript:oldWin('teste_popup.php4?oper=1')\">Close e Update</a>\n"); print("<br>\n"); print("</body>\n"); print("</html>\n"); ?> Could anyone help me out to adapt it to any browser? Thank you very much and merry christmas, Carlos Fernando Scheidecker Antunes. Salt Lake City, Utah - USA. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]