File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Closing parents parent html file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Closing parents parent html file" Watch "Closing parents parent html file" New topic
Author

Closing parents parent html file

ruquia tabassum
Ranch Hand

Joined: Jun 23, 2007
Posts: 288

HI i have 4 html files a.html,b.html,c.html,d.html. when i click a button in a.html a small window opens that loads b.html in it, wheni click a button in b.html.. the window with b.html gets closed and another window c.html opens... now when i click a button in c.html i want to close a.html which is still open and the master parent of all... and in place of a.html i want to open d.html...

Can anybody suggest me how do i access the parents parent window.. as here for c.html .. parent is b.html.. which needs to be closed.. and a.html is b.html's parent.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 14857
You can not close windows that are NOT opened up with JavaScript.

Eric
ruquia tabassum
Ranch Hand

Joined: Jun 23, 2007
Posts: 288

All the windows are open using javscript.... like

var window1=window.open("a.html",'','')

This message was edited 1 time. Last update was at by ruquia tabassum

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 14857
ruquia tabassum wrote:All the windows are open using javscript.... like

var window1=window.open("a.html",'','')


I believe the poster already knows that. Their description of their problem states they are opening windows.
ruquia tabassum
Ranch Hand

Joined: Jun 23, 2007
Posts: 288

i did not get it.. i want to close the window a.html from c.html, which is parents parent of c.html.... can anybody suggest me.. how do i do this?
 
jQuery in Action, 2nd edition
 
subject: Closing parents parent html file
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com