Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

window close script

vanilla forum window side close script

Comments

  • Options

    give me window close script

  • Options
    whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @frindman

    As it stands, your request doesn't really make any sense.

    Please try to give some proper detail regarding what you are trying to do.

  • Options

    @whu606 said
    As it stands, your request doesn't really make any sense.

    problem is, english does not seem to be his native language and like a few others will not post in his own language for some strange reason.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited January 2014

    Maybe this is what he is looking for

    Example

    Use open() to open a new window, and close() to close the new window:
    
    function openWin()
    {
    myWindow = window.open("","myWindow","width=200,height=100");    // Opens a new window
    myWindow.document.write("<p>This is 'myWindow'</p>");            // Some text in the new window
    }
    
    function closeWin()
    {
    myWindow.close();                                                // Closes the new window
    }
    

    http://www.w3schools.com/jsref/met_win_close.asp

    or this

    http://www.javascriptkit.com/script/script2/closewin.shtml

    <form>
    <input type="button" value="Close Window" onClick="window.close()">
    </form>
    
    <a href="javascript:window.close()">Close Window</a>
    

    or this

    http://www.javascript-coder.com/window-popup/javascript-window-close.phtml

    <script type="text/javascript">
       function popuponclick()
       {
          my_window = window.open("",
           "mywindow","status=1,width=350,height=150");
    
          my_window.document.write('<h1>The Popup Window</h1>');
       }
    
       function closepopup()
       {
          if(false == my_window.closed)
          {
             my_window.close ();
          }
          else
          {
             alert('Window already closed!');
          }
       }
    </script>
    
          <a href="javascript: popuponclick()">Open Popup Window</a>
    
          <a href="javascript: closepopup()">Close the Popup Window</a>
    
  • Options
    peregrineperegrine MVP
    edited January 2014

    @vrijvlinder said:

    and tried to intuit a somewhat incomprehensible question.

    Yes, but it would be great if people posted in their native language if they can't express what they need in english. It would save alot of crystal ball guesses and time, although describing what you want effectively, would negatively affect the number of guesses it takes to solve the problem.

    Perhaps they can't translate the responses in english either.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited January 2014

    Well if they are from Sri Lanka it is understandable. Google does not have Sinhalese.

    It would save alot of crystal ball guesses and time

    Yes and you would have to beat me, the all time champion of Crystal Balling...

  • Options
    peregrineperegrine MVP
    edited January 2014

    if it was a language not in google, they could still post in Sinhalese or their language and perhaps someone could translate. It certainly couldn't hurt.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited January 2014

    Yes but not the google translate tools http://translate.google.com

    Good that you posted that though, if he is from Sri Lanka he may well be able to communicate better :)

    at the very least , what I posted about window close script might help someone else too :)

Sign In or Register to comment.