Close window. Close! Close!! Clooose!!!!!!!

I want to write a script what opens a window, and close that window, what opens the window. So I make a script like that:

.
.
.
window.open(...
window.close()
.
.
.

It's work but it has a question to me. I don't want thet question. Can anybody help me?

Please?
Pretty please?
Pretty pretty please?
Pretty pretty pretty please?
Pretty please with sugar on top?
Pretty please with sugar and a cherry?
Pretty please with sugar, nut and a cherry?
Pretty please with sugar, nut, cherry and chocolate springlies?
But I really need it.
But I really really need it.
But I really desperatly need it.
It's a matter of life and death.
If you don't answer me I will never speek to you again!
Ah cum' on be a pal.

You still reading?

By now. I sad BY!!! Oh don't forget to answer me!


Comments

  • : window.open(...
    : window.close()

    That would close the window you are calling it from. To close the window you just opened, use:

    $window1=window.open();
    $window1.close();

    You can also manipulate that window through the "$window1" object.

    If you want the new window to communicate with the parent window, use:

    parent.window.close();

    [italic][blue]-- Spida.[/blue][/italic]


  • Thanx. But I think you don't understand. Maybe it's my fault.

    So I want to open a window form another one, and I want to close that window, what opened the new one.

    I try:
    windows.open(...
    windows.close()

    It's worked, but it's asks me to close the window.
    I don't want that question!

    But it's also good if I can open the other window in the first.
    Like _self but I can't use it.

    If you can solve this for me.

    Please...



  • : Thanx. But I think you don't understand. Maybe it's my fault.
    :
    : So I want to open a window form another one, and I want to close that window, what opened the new one.
    :
    : I try:
    : windows.open(...
    : windows.close()
    :
    : It's worked, but it's asks me to close the window.
    : I don't want that question!
    :
    : But it's also good if I can open the other window in the first.
    : Like _self but I can't use it.
    :
    : If you can solve this for me.
    :
    : Please...
    :
    :
    :

    Oh, you don't actually have permission to close the parent window without a confirmation dialog appearing. You can only automatically close windows you have opened or created.

    [italic][blue]-- Spida.[/blue][/italic]


  • This is to easy,

    Offcourse you can close your parent window.
    I hate people who say it can't be done.
    Everyting can be Done is my motto

    try this out:

    daddy = window.self;
    daddy.opener = window.self;
    daddy.close();


    What does the script do, it tells to the parent window, now your
    a child of your own. So child windows can be closed without the irritating message ARE YOU SURE!

    So i hope this helped your problem, sorry that i was so late :)

    Greetz
    Tyreal
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories