Guide to creating a web site, web design, web development, internet marketing, promotion, html tips and tricks, javascript and more.

Your Guide to Professional
Web Site Design and Development

HTML Tips
HTML Codes
Web Development
Web Design Tips
JavaScript Codes
216 Web Safe Colors
CSS Tutorial
JavaScript Tutorial
ASCII Character Codes

Offering Free Javascript Tips, Snippets and Codes

Open Directory Projectfree ebooksfree articles
web site design development internet marketing and promotion tutorials

| Web Site Development | HTML Codes | HTML Tips | Web Design TipsJavascript Snippets | 216 Safe Colors | Symbols | CSS Tutorial | JavaScript Tutorial |

webmaster resources
website design

First Visit Pop Up Window

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 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 harassing them with a pop up window each time they visit your web site.

Place the following JavaScript code within the <BODY> of your web page.
<SCRIPT LANGUAGE="JavaScript">
<!-- Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development
function GetCookie(name) {
var arg=name+"=";
var alen=arg.length;
var clen=document.cookie.length;
var i=0;
while (i<clen) {
var j=i+alen;
if (document.cookie.substring(i,j)==arg)
return "here";
i=document.cookie.indexOf(" ",i)+1;
if (i==0) break;
}
return null;
}
var visit=GetCookie("COOKIE1");
if (visit==null){
var expire=new Date();
window.name = "thiswin";
newwin=open("yourpagename.html", "dispwin",
"width=450,height=455,scrollbars=yes,menubar=no");
expire=new Date(expire.getTime()+7776000000);
document.cookie="COOKIE1=here; expires="+expire;
}
// -->
</SCRIPT>


Edit the JavaScript code for your first visit pop up window to suit your needs.

Replace the words "yourpagename.html" with your pop up window address and edit the window's width and height to your desired size.

Script courtesy of:
Brian Terry http://www.secretwebriches.com




Submit your JavaScript code snippets. We'll credit you and give you a link to your website.