Reload A Window Snippets


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

14 July, 2014   

A few points of interest: * The HREF links use JavaScript to set a browser cookie named "style". * Since we are only setting one cookie and it's name is "style", we can read its value using "document.cookie.charAt(6)". * If no cookie is set, "StyleFile" will evaluate to "style.css". * The...

17 April, 2013   

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

18 September, 2012   

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

22 August, 2011   

Here shown how to center an element on screen

26 November, 2018   

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

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...

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

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

15 December, 2011   

An Example Java Code for Composition with public objects

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 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

17 April, 2013   

This code only works in Firefox and Chrome

Set the Border style of your main form to bsNone and then use System Parameters Info message to get the SPI_GETWORKAREA value then use Set Bounds to make your Window the correct size.

27 August, 2011   

The <frame> tag defines one particular window (frame) within a frameset. In the example below we have a frameset with two columns. The first column is set to 25% of the width of the browser window. The second column is set to 75% of the width of the browser window. The document "frame_a.htm" is put into the first column, and...

18 September, 2014   

Copying elements between frames