Page 1 of 1

pop up input window and update main window

Posted: Tue Aug 02, 2005 10:30 pm
by tkarven
hi,

i got a main page , when user select to update or insert new record, it pop up another new window for input purpose.

my question is , how can we notify the main page to refresh it's content after the user finish their input at the pop up window ?

beside that, i used javascript : window.open to pop up that input page. will it be blocked by those pop up blockers software ?

thx

Posted: Tue Aug 02, 2005 10:36 pm
by feyd
answer 1:
window.opener often works well..

answer 2:
the popup may be blocked, it depends on the policies the blocker uses, each one does it a little differently. Firefox and the other Mozilla browsers are smart enough to allow ones that "you" request (most often) through an action, but IE's is not.

Posted: Tue Aug 02, 2005 11:23 pm
by tkarven
hmmh, my question was, how can we notify the first window to refresh it's contents, after we update it's contents through the pop up window...

thx for ur reply ^_^

Posted: Wed Aug 03, 2005 12:14 am
by feyd
I answered both questions you asked.

Posted: Wed Aug 03, 2005 12:49 am
by dreamline
Have a look at the link in my sig and you'll see the result on how it's done when clicking on Ratings... Here's a little code snap i used:

Code: Select all

<body background="images/ratings_background.jpg" onLoad="javascript: window.opener.document.form3.useraction.value=1;window.opener.document.form3.songID.value='';
window.opener.document.form3.actions.value='';window.opener.document.form3.submit();">
This is not all since i also use PHP for determining whether to refresh the main page, but like feyd said windows.opener is the way to go.. :D

Posted: Wed Aug 03, 2005 1:04 am
by tkarven
icic..thx so much