Ask Experts Questions for FREE Help !
Ask
    gopitamil's Avatar
    gopitamil Posts: 1, Reputation: 1
    New Member
     
    #1

    Aug 29, 2007, 04:57 AM
    How to close a window via anotherframe
    Here I have two frames

    Frame1 with a link,frame 2 with logout
    Whenever I click a link in frame1 a new popup window will open.
    I have to close that window via frame2 logout option.
    Can anyone help?
    WadeG's Avatar
    WadeG Posts: 15, Reputation: 1
    New Member
     
    #2

    Aug 29, 2007, 05:02 AM
    Quote Originally Posted by gopitamil
    here i have two frames

    frame1 with a link,frame 2 with logout
    whenever i click a link in frame1 a new popup window will open.
    i have to close that window via frame2 logout option.
    can anyone help?
    I am assuming you are spoeaking of HTML?
    If so are you using a editor (ie. Front page)? Are you able to let us see the code?
    jstrike's Avatar
    jstrike Posts: 418, Reputation: 44
    Full Member
     
    #3

    Sep 4, 2007, 09:54 PM
    If you have a JavaScript function that opens a window in Frame 1, put a function on that same frame to close the window.
    For example:
    Code:
    var winHandle;
    function openWindow() {
      winHandle=open(.....);
    }
    
    function closeWindow() {
      winHandle.close();
    }
    In frame 2 when you want to close the popup refer to the function in frame 1 by using parent.
    Code:
    function logout() {
      ...do some stuff...
      parent.closeWindow();
    I'm doing this off the top of my head so you'll obviously have to mess around with it a bit, but that should give you an idea of the general concept.

    Good Luck.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

How to close all the childwindows(popup window) when closing the parent window [ 3 Answers ]

Hi, all In javascript I need to close all the child windows that I have opened through a parent window Scenario: Here I will be having as many as child window opened and name given to the child window can not be tracked because each will be having a different name, and I am using 70 to...

How to close window with deep hierarchy [ 1 Answers ]

Friends.. this is my first mesg to this group.. Thanks in advance.. When I click on CLOSE asp button.. it should do some saving process at server side and close that window and all its child windows if any. How can I handle this situation. I tried with window.close() Its not working.

Close all child windows through parent window [ 1 Answers ]

I want answer for the above question asapp

How to close a power window in open position? [ 3 Answers ]

'93 Integra - p/s window is in open position. I am waiting for a new Master Switch for the driver's side because I read that this was common fault w/problems. If this doesn't work, anyone help w/how to jump the motor to close the window? Also, how can I check if motor has gone south on me w/o...

Old wooden window won't close [ 8 Answers ]

I have a wooden window that jams about 6" from the bottom. It seems to jam on the left side and there's a small pile of sawdust in that corner. It doesn't look like the individual sliding parts of the window can be removed. Any advice?


View more questions Search