How to open new window and how to make popup windows using javascript

Making of popup windows and how to open new browser window of a new url

Category: Java Script Tags: HTML, Java Script

Java Script tutorial 12

        Today I am going to show you how to make such a popup window or how to open new window
using javascript if client clicks on a control like image.

<script type="text/javascript">
var newWindow;
function change(URL)
newWindow =, "Dotnetlovers",
<p>Dotnetlovers is a good website for learn any type of coding techniques.</p>
<h4>Click below on logo of Dotnetlovers:</h4>
<img src="dotnetlovers.png" alt="Professional Ajax, 2nd Edition" border="0"
onclick="change('default.aspx')" />

        Here in above code we created an image control and onclick event bounded with function change() with parameter URL of page which we wanted to open. In the function we created variable newWindow which gets the identity of new opened window. We use here with three arguments, first is URL of window to be opened and second is a small description or may be title of that window and third is a group of characteristics of new window like width, height, scrollbars, resizable, location, menu-bar etc.

Like 1 Person
Last modified on 29 August 2018
Nikhil Joshi

Nikhil Joshi
Ceo & Founder at Dotnetlovers
Atricles: 136
Questions: 12
Given Best Solutions: 12 *


You are not loggedin, please login or signup to add comments:

Existing User

Login via:

New User