Need help? Check out our Support site, then


How to close a window using HTML

  1. My sites are a mixture of blogging and pages: no problems with the former, and not many with the latter.
    I can open up a different page within my pages, and have this appear in a new window/tab (depending on browser) using basic HTML such as <!text to appear>.
    What I would like to be able to do as an act of courtesy for my few readers, is to provide them with the ability to close the window by clicking on some text. The standard HTML I have seen is:
    <!Close>
    but this doesn't appear to work.

    I am using Pilcrow as my theme. I have attempted to turn the code into comments: apologies if this hasn't worked!

  2. The code should be:
    <a> href="http:/wordpress.com">text to appear</a>
    <a href="JavaScript:window.close()">Close</a>

  3. Javascript is stripped out here, for security reasons. You'll have to find another way.

  4. Please see here for restricted codes > http://en.support.wordpress.com/code/
    See this entry also so you are clear on the differences between free blogs from and being free hosted by wordpress.COM and wordpress.ORG installs for self hosting. > http://support.wordpress.com/com-vs-org/

  5. Thanks Guys: had wondered if that was the case, but have had to learn so many (specialist) programming languages over the years that Java and its possibilities including the risks is a gap in my knowledge.

    I have an alternative way of setting up my pages, just wondered if it could be done in HTML without Javascript.

Topic Closed

This topic has been closed to new replies.

About this Topic