Click to See Complete Forum and Search --> : Open and close pop-up


scotta
02-07-2003, 03:35 AM
I am opening a new window with the following code:
function openreports(URL){
var repwin=open(URL)
}
The window opens up and the user then browses around then clicks on a link that runs the following function:
function post(ProjCode)
{
opener.document.Form1.Projcode.value = ProjCode;
opener.document.Form1.txtGo.value = 1;
opener.document.Form1.submit();
self.moveTo(200,150)
self.resizeTo(400,300)
window.location = "Wait.htm";
}
The pop-up is resized and changes to the wait.htm page. The opener is submitted but on the next page I have the following code in the body tag:
onLoad="repwin.close();"
This gives the following error:
Error: 'repwin' is undefined

Nicodemas
02-07-2003, 03:46 AM
Instead of repwin.close() you want self.close()

scotta
02-07-2003, 03:55 AM
No,
The pop-up window causes the parent to submit.
The pop-up then changes to a wait page.
The onload...close() is in the results of the parent submit and closes the pop-up that is saying please wait.