How do I add a 'close this window' button to a page please?

I have tried using the only snippet I can find and it looks good but just does not work. Any ideas would be greatly appreciated. Thanks
Jim

A Google search for javascript close window go this response: http://www.google.com/search?client=safari&rls=en-us&q=closewindowjavascript&ie=UTF-8&oe=UTF-8.
An easy one that I found was:
<xmp>
<A href="javascript: self.close ()">Close this Window</A>
</xmp> *(Ignore the <xmp></xmp> tags when copying)*
And works fine. When you add the snippet enlarge the results box as it tended to cut off some of the text when published.

Similar Messages

  • Still no solution to adding a 'close this window' button to a page

    Hi can anyone help please with this problem? I have used the following html in snippets
    <form>
    <input type=button value="Close Window" onClick="javascript:window.close();">
    </form>
    which shows a button but it does not close the window in all browsers e.g. not in Safari beta or firefox.
    Thanks in anticipation
    Jimbob

    Where do you see the target='_top"? I went looking for the original button from my original post which was in the http://web.me.com/toad.hall/HelperSite//Page1_files/widget3markup.html page via the Activity window and view source and this is what the code of that widget page is:
    <xmp>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title></head><body><form>
    <input type=button value="Close Window" onClick="javascript:window.close();">
    </form> </body></html>
    </xmp> (Ignore the <xmp></xmp> tags when using)
    I don't see the target='_top" in there. What am I missing? This was my first post: http://discussions.apple.com/message.jspa?messageID=9134142#9134142.
    Thanks for the help.

  • Arabic is not listed as a display language in iTunes for Windows 7. How can I add support for this language?

    Arabic is not listed as a display language in iTunes for Windows 7. How can I add support for this language?

    Edit  ---> referance ----->   general    ------> language

  • Captivate 8: How do I close this window?

    I am not sure what to call it but how do I close this window and prevent it from popping up again please?
    Oh and is there a way to minimize the icon sizes on the toolbar?
    Thanks in advance.

    About the icon sizes...
    Assuming you mean these?
    If so... nope. Can't change them.
    But I can offer you a free membership to the "learning to live with it" club if you want. We are offering a buy one at regular price and get three free special today.
    Cheers... Rick

  • How can I stop the "Are you sure you want to close this window?" box?

    Hello,
    Could someone please tell me how to stop safari/google from warning when there is text written in the search query box of google and I try to close the window? The message runs as follow: "*Are you sure you want to close this window?* You have entered text on "Google". If you close this window, your changes will be lost. Do you want to close this window anyway?"
    I'm using Safari 3.2 and I have my preferences set to open new links in new windows rather than in tabs. I did try unchecking the warning message for closing multiple tabs, despite the fact that I'm not using tabs. However, that didn't work.
    Thanks in Advance

    I would have to say it's a bug in Safari 3.x, as it apparently worked in Safari 2.x. I'm sure a bug report has already been filed on this, but if you want to give feedback to Apple about it and encourage them to fix it sooner rather than later, use this Feedback link.
    Mulder

  • Can anyone help me close this window in Safari?

    I can't seem to close this window out in Safari. Everytime I restart Safari it opens all of my previously opened windows. I can't seem to acess or empty my cache to start fresh and my menu options are mostly faded out. Can someone tell me how I can start Safari over and open a new window by default instead of having it open an old session up? 
    Here's a screenshot of what I'm talking about:

    Scratch that. I fixed it!

  • How do I add docs to Finder window sidebar?

    Hi
    How do I add docs to Finder window sidebar? I used to be able to, now I can't. I can add folders but not docs.
    best,
    elmer

    That feature has been dropped with Mavericks.  I've since added a folder to my dock and add the single documents to it:
    OT

  • There is screen information of Airplay popping up on the screen every second minute. How do I get rid of this window? Everything is already connected

    There is screen information of Airplay popping up on the screen every second minute. It's stating: 1. Network Configuration: Connect to wifi network 2. Choose this Apple TV. However wifi is already connected and this apple tv has been chosen. How do I get rid of this window as everything is working already fine and everything is connected. Airplay and wifi are working already.

    Had this happen to me after a recent update, was super annoying.  To turn off, go to Settings > AirPlay > Conference Room Display > Off.

  • HT5140 I did put another language in input source, and keyboard shortcut, but when I close this window, after opening the mail window, where do I see different language to click on?

    I did put another language in input source, and keyboard shortcut, but when I close this window, after opening the mail window, where do I see different language to click on?

    You switch keyboards by going to the " flag" menu at the top right of the screen.

  • How to output particular text in main window only in first page

    Hi experts how to ouput particular text in main window only in first page after that actual transaction data will be continued.....any ideas....Answers will be rewarded.....

    Hi,
    Try this.
    /: IF &PAGE& = '1'
    /: ENDIF
    Thanks,
    Naren

  • How can I add a fade or other transitions to the pages of my website?

    How can I add a fade or other transitions to the pages of my website?

    like this :
    http://www.onextrapixel.com/2010/02/23/how-to-use-jquery-to-make-slick-page-transitions/
    Cheer up !

  • How do i add and email based submit button to a form

    how do i add and email based submit button to a form

    See this: http://help.adobe.com/en_US/acrobat/using/WSBB6EF75F-BC3D-4094-B787-FB76DAE1EBDC.w.html

  • How do I add a background color to a document in Pages?

    How do I add a background color to a document in Pages?  I have made an invitation, with a photo in it, the text is in color, and I want to make the background pink instead of white.  thanks

    whoops sorry figured it out thanks!

  • How can I add a new Template to My Templates in Pages? I've read most of the discussions on the subject but it doesn't work for me. By the time I reach the Templates folder, I only see templates for Numbers and not for Pages. Need help, please.  Thanks

    How can I add a new Template to My Templates in Pages? I've read most of the discussions on the subject but it doesn't work for me. By the time I reach the Templates folder, I only see templates for Numbers and not for Pages. Need help, please.  Thanks

    Si vous avez utilisé la commande Save As Template depuis Pages, il y a forcément un dossier
    iWork > Pages
    contenant Templates > My Templates
    comme il y a un dossier
    iWork > Numbers
    contenant Templates > My Templates
    Depuis le Finder, tapez cmd + f
    puis configurez la recherche comme sur cette recopie d'écran.
    puis lancez la recherche.
    Ainsi, vous allez trouver vos modèles personnalisés dans leur dossier.
    Chez moi, il y en a une kyrielle en dehors des dossiers standards parce que je renomme wxcvb.template quasiment tous mes documents Pages et wxcvb.nmbtemplate à peu près tous mes documents Numbers.
    Ainsi, quand je travaille sur un document, je ne suis pas ralenti par Autosave.
    Désolé mais je ne répondrai plus avant demain.
    Pour moi il est temps de dormir.
    Yvan KOENIG (VALLAURIS, France)  mercredi 23 janvier 2011 22:39:28
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • My Game Center account won't let me add friends on this device. Can anyone help please?

    My Game Center account won't let me add friends on this device. Can anyone help please?

    What's more, it's absolutely ridiculous that there's no direct way of contacting Apple about this. In fact, as far as Game Center is concerned, there's no support network at all.
    It's either sheer idiocy or arrogance in action, here. Products go wrong - even yours, Apple.

Maybe you are looking for