Close Window Snippets


18 September, 2012   

Attempts to close the current window. You can use it for popups

17 April, 2013   

In Firefox, Safari and Chrome, this script only works if the window was originally opened using Javascript (window.open function)

How to close child window when parent window is closed using JavaScript in asp.net application

26 November, 2018   

Cross-browser method for testing for pop-up blockers.

25 February, 2013   

AppleScript code example for clicking menu items

20 May, 2013   

Clicking menu items using AppleScript

17 July, 2013   

Using AppleScript Clicking menu items

15 December, 2011   

An Example Java Code for Composition with public objects

18 September, 2014   

Copying elements between frames

Place the following JavaScript code into your HTML where you would like the button to appear:

22 August, 2011   

Here shown how to center an element on screen

26 January, 2013   

jQuery code example to open link in a new window

09 November, 2013   

Use this snippet to determine the size of an open window. Can be used in many different situations, e.g., for setting the size of a div.

03 April, 2011   

If you're looking for a JavaScript code to enable you to create a first visit pop up window for your web site, you've come to the right place. Pop up windows can provide a great way to gain new subscribers to your publication and even increase your sales. However, they can also be very irritating to your visitors. For this reason, you may want...

Most today's web browsers like Firefox (Ctrl+D), Opera (Ctrl+T) and IE (Ctrl+D) provide a keyboard shortcuts to enable users bookmark their favorite pages. But if you want to provide your visitors with a "Bookmark this page" link they can click you may use the code below: It works in IE, FireFox and Opera. Clicking on the link prompts...

13 December, 2011   

Chooses a pre-determined playlist from your iTunes library

03 April, 2011   

Often when working on scripts alert boxes are placed inside loops as a debugging tool. You can sometimes end up with hundreds of alert boxes and no way to stop them. This script placed at the start of your code will give you an option to disable the alert boxes after a pre-determined number set by you.

26 June, 2013   

Clear memory, clear console and close all figures.

26 September, 2011   

Pop up windows can provide a great way to gain new subscribers to your publication and even increase your sales. However, they can also be very irritating to your visitors. For this reason, you may want to use a pop up window JavaScript code that will only load the pop up window on your visitor's first visit. That way you're not continually...

CSS code to highlight links that open in a new window