View Full Version : How to make popup windows showing on first time browsing website.

02-06-2013, 06:32 AM
How to show the popup window only once time?

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<link rel="stylesheet" href="http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/windowfiles/dhtmlwindow.css" type="text/css" />

<script type="text/javascript" src="http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow//windowfiles/dhtmlwindow.js"></script>

<script type="text/javascript">
var inlinewin=dhtmlwindow.open("broadcastbox", "iframe", "http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow//windowfiles/external.htm", "#2: Broadcast Title", "width=400px,height=320px,left=150px,top=10px,resiz e=1,scrolling=0", "recal")


the script is getting from this site http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm

if insert the script above in <head>, it will effective on every page of my website. How to make it showing on first time browsing website.

02-06-2013, 08:11 AM
you would need cookies to see if visited before

02-06-2013, 08:59 AM
Yes, Jquery has an excellent cookies plugin you can use.

02-06-2013, 09:09 AM
You're already using a pop-up/modal window script (colorbox), so why loading another script for this (dhtmlwindow.js is quite a big file as well and to be honest pretty outdated). I'm sure we can make this happen with colorbox too.