PDA

View Full Version : Page Communcation



LoneRaven
August 1st, 2003, 22:42
Is there a way to have a child window send information back to a parent window. Also, is it possible to switch focus to another window when the information is sent.

Here is what I would like to do. I am working on a calendar system. When you click a day in the main small calendar it changes to show you all of the events of the given day. When you click one of those events it displays the event information under the calendar and event listing. However, if the user wants to view the entire month calendar they can click a link to open the full calendar (aka Child Window). If the user clicks an event link on the full calendar, I want the child to send the information to the parent and change focus to the parent. The parent window would respond to the recieved data by changing the events listing to the selected day and display the events information under the calendar and events listing. I am creating these pages in PHP. It would be best if the needed code was in HTML or PHP but javascript will work as well.

If you have any questions about what I am trying to accomplish just ask. Thanks in advance.

Attached is an example from the site I am working on. It will help to see exactly what I am trying to do.

ingonab
August 2nd, 2003, 14:32
Is there a way to have a child window send information back to a parent window.
These forums do that with the "Show all Smiles" window. (The one you can get while typing up a post.)


Also, is it possible to switch focus to another window when the information is sent.
Don't know about this. (Though stealing focus sounds like a feature M$ wouldn't miss out in adding..)

Doomulation
August 2nd, 2003, 17:38
I don't know how ET does it, but you can create a reference in the child window:

var new_win = open(bla bla bla, you know the drill);
new_win.parentwin = this;

...or something similar.