Welcome to W3Courses
 Like Us on Facebook

How to Display a Webpage in the PopUp Window after Clicking from a Link using JavaScript

The following code will add a link to your webpage and when clicked on the link, the hyperlinked webpage will open in a popup window

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=600,left = 262,top = 84');");
}

// End -->
</script>

<A HREF="javascript:popUp('http://www.w3courses.com')">Open the Popup Window</A>

Share