PDA

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


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


<!DOCTYPE html>
<html lang="en">
<head>
<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")
</script>

<body></body>
</html>


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.

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

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

gentleone
02-06-2013, 10: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.