D
Diana Coppenbarger
Hi,
I have a calendar program that is popped up by a HTML so that the user
can choose a specific date to be filled in via javascript from the
calendar program. I am using window.open() to start the calendar
program and then calling my own function "javascriptpener.setDate()"
to set the date back on the main window. This all works fine if I use
the current month that is displayed, but as soon as I have to rebuild
the calendar because they want to go to another month, the opener is
not being set correctly. The javascript for popping up the calendar
window and changing the month looks like:
function popupCal
{
calWin = window.open('/cgi-script/calWin','calWin');
}
function changeMonth(month)
{
calWin.open('/cgi-script/calWin'+month,'calWin');
alert(calWin.opener.location);
if(calWin.opener == calWin){
calWin.opener = this; // reset back to main window
}
alert(calWin.opener.location);
}
(The alerts were added for debugging.) This all works just fine in
IE, but when trying from Netscape 7.1 or Mozilla, the calWin.opener is
not reset and the alert says the calWin.opener.location is the same as
the calWin.location. Everything I have read about opener says you can
reset it like this, but it doesn't seem to work. Does anyone have any
suggestions?
-Diana
I have a calendar program that is popped up by a HTML so that the user
can choose a specific date to be filled in via javascript from the
calendar program. I am using window.open() to start the calendar
program and then calling my own function "javascriptpener.setDate()"
to set the date back on the main window. This all works fine if I use
the current month that is displayed, but as soon as I have to rebuild
the calendar because they want to go to another month, the opener is
not being set correctly. The javascript for popping up the calendar
window and changing the month looks like:
function popupCal
{
calWin = window.open('/cgi-script/calWin','calWin');
}
function changeMonth(month)
{
calWin.open('/cgi-script/calWin'+month,'calWin');
alert(calWin.opener.location);
if(calWin.opener == calWin){
calWin.opener = this; // reset back to main window
}
alert(calWin.opener.location);
}
(The alerts were added for debugging.) This all works just fine in
IE, but when trying from Netscape 7.1 or Mozilla, the calWin.opener is
not reset and the alert says the calWin.opener.location is the same as
the calWin.location. Everything I have read about opener says you can
reset it like this, but it doesn't seem to work. Does anyone have any
suggestions?
-Diana