Refresh Main Screen

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
winsonlee
Forum Commoner
Posts: 76
Joined: Thu Dec 11, 2003 8:49 pm

Refresh Main Screen

Post by winsonlee »

I have a page name index.php loaded on firefox.
After clicking on a link on page index.php, a new window name addname.php loaded.
addname.php contains a form with few field.
How can i make in such that after clicking add button on addname.php, the info automatically displayed on index.php without me clicking on the refresh button.
User avatar
php3ch0
Forum Contributor
Posts: 212
Joined: Sun Nov 13, 2005 7:35 am
Location: Folkestone, Kent, UK

Post by php3ch0 »

You could use some javascript

Code: Select all

<HTML><HEAD></HEAD>
<SCRIPT LANGUAGE="JavaScript"><!--
function openChild(file,window) {
    childWindow=open(file,window,'resizable=no,width=200,height=400');
    if (childWindow.opener == null) childWindow.opener = self;
    }
//--></SCRIPT>

<BODY>
<FORM NAME="parentForm">
<INPUT TYPE="button" VALUE="Open child" onClick="openChild('examplejs2.html','win2')">
<BR><INPUT NAME="pf1" TYPE="TEXT" VALUE="">
<BR><INPUT NAME="pf2" TYPE="TEXT" VALUE="">
</FORM></BODY></HTML>
Post Reply