JavaScript Pop Up Window Code

Web hosting, SEO, etc... related
Post Reply
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

JavaScript Pop Up Window Code

Post by Nipuna » Thu Oct 27, 2011 10:11 am

When I was searching for a JavaScript pop up window code for freelancer work of mine. I found this and this just what I needed

To create a popup you'll need the following script:

Code: Select all

<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
	newwindow=window.open(url,'name','height=200,width=150');
	if (window.focus) {newwindow.focus()}
	return false;
}

// -->
</script>
Then, you link to it by:

Code: Select all

<a href="popupex.html" onclick="return popitup('https://robot.lk')"
	>Link to popup</a>
Have fun with it :)
Post Reply

Return to “Web Related”