Re: reload help!!!

From: Date: Fri, 02 Feb 2001 09:17:02 +0000
Subject: Re: reload help!!!
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-37806@lists.php.net to get a copy of this message
Can you please explain more detail because I'm new in Javascript and PHP? How should I write my coding in order to target the parent window? I am trying so many ways but I'm still can't manage to do it. Please help me again. This is in Parent window. The delete buttons are looping buttons. #### Delete button in parent window######## print "<TD><input name=\"delbutton$count\" type=\"button\" value=\"del\" onclick=\"NewWin=window.open('URL?count=$count&doc_var=$doc_var&doc_no=$doc_no&doc_rev=$doc_rev&flow_no=$flow_no','NewWin','toolbar=no,status=no,scrollbars=yes,width=400,height=200')\"></TD>\n"; ######################### In child window have two delete buttons: ############################### function delopt() ############################### { global $h,$newbutton,$doc_var,$count,$doc_no,$doc_rev,$flow_no; $db = mysql_select_db("tkenet_db"); print "<HTML> <HEAD> <TITLE>PMP Document Approval</TITLE> </HEAD> <BODY background=images/bg_tkenet.gif >\n"; print "<SCRIPT LANGUAGE =\"JavaScript\"> \n"; print "function confirm_del() { if(confirm('Are you sure you want to delete!')) {self.location.href=\"URL\"} else {return false;} }\n"; print "</SCRIPT>\n"; print" <form method=\"Post\" name=\"deleteform\" action=\"newwin.php\" onSubmit=\"return confirm_del(); window.close\"> <center> <H1>Delete Option</H1> </center> <UL> <LI>Delete Link = Delete the document number in the textbox <LI>Delete All = Delete the document number in all tables </UL> <center> <input name=\"newbutton\" type=\"submit\" value=\"Delete Link\"> <input name=\"newbutton\" type=\"submit\" value=\"Delete All\"> </center> <INPUT TYPE=hidden NAME=\"doc_no\" VALUE=\"$doc_no\"> <INPUT TYPE=hidden NAME=\"doc_rev\" VALUE=\"$doc_rev\"> <INPUT TYPE=hidden NAME=\"flow_no\" VALUE=\"$flow_no\"> <INPUT TYPE=hidden NAME=\"doc_var\" VALUE=\"$doc_var\"> <INPUT TYPE=hidden NAME=\"count\" VALUE=\"$count\"> </center></form></body> </HTML>\n"; } #################################################################### John Luxford wrote: > > Could you not just set the target in the new window form to the name of > the parent window, and use an onsubmit="window.close ()" to lose the > popup as well? > > Lux > > Wen Ni Leong wrote: > > > I am not sure whether this is related to PHP. I'm using PHP and > > > > Javascript to do my program. > > > > I have some problem with my reloading parent window. > > > > > > > > In my program, I have a delete button which will pop up a child window > > > > once the user clicked the button. In the child window will have two > > > > option of delete buttons. > > > > Once the user clicked either one button, i want the child window to be > > > > close and at the same time the parent window will reload. How should I > > > > do this. > > > > Please give some advise or tips to me. > > > > > > > > thanks.

« previous php.general (#37806) next »