Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close window on click 1

Status
Not open for further replies.

cuetzpalin

Programmer
Joined
Jun 5, 2002
Messages
99
Location
US
Hello,
I have a page with 2 frames.
The top frame has category headings. The bottom frame has text boxes under each category heading for input. Also, on the bottom page I have a "submit" button and "Cancel" button. The "Submit" button updates a table. I would like to close the page after the "Submit" takes place and also if the user clicks on "Cancel". However, I think the frame doesn't allow me to use the <a href='javascript:window.close();'>, since I click on "Cancel" and nothing happens. It was recommended that I call another page...which is feasible, but how can I close the page with the frames?

Please help.

Thank you!
-Ed
 
Try calling this function when you want the page to close:
Code:
function closeFunction() {
   top.opener = self;
   top.window.close();
}

-kaht

...looks like you don't have a job, so why don't you get out there and feed Tina.
[banghead]
 
That did the trick! Thanks a bunch!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top