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>
Related Articles
- Validate a Check Box Using JavaScript
- Automatic Redirect using Javascript
- Multi Level Drop Down Category & Subcategory Hierarcheal Selection using JavaScript
- Flash and JavaScript Conflict: Javascript Menu goes behind the flash file
- Display Current Date Automatically on your Website using JavaScript
- How to Create a Reload Button which will Reload the Webpage upon Clicking using JavaScript
- Automatically Redirect from one Webpage to Another Webpage using JavaScript
- Disable Right Clicking on Webpage, Images and Photos with JavaScript
