[thelist] Javascript Window Problems

Keith cache at dowebs.com
Tue Dec 18 11:14:42 CST 2001


Hi Chris

>      I have been tasked with creating a popup warning window for my
>      day job.  I was able to find some dhtml code that does this quite
>      nicely, however, I cannot get it to do 1 task that is needed.  If
>      the user does not agree with the terms, then they are sent
>      somewhere else.

The document returned from the server when they click agree or 
disagree is loading into a frame in your child window. You need to 
jump out of that frameset to communicate with the mainh browser 
page.

First place an "opener=self" in the script of your main browser page 
ABOVE the part of the script that opens the child window. Then use 
an onload event on the return doc from the server

onload='top.opener.location="http://usps.com"'

to jump first to the childwindow parent and then back to the main 
page with a redirect.  That way you can eliminate the function 
Declined_click. If you want to keep the function Declined_click use

onload='top.opener.Declined_click()'

instead

Works for me

keith






More information about the thelist mailing list