SEO Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   SEO Chat ForumsOtherSEO Scripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread SEO Chat Forums Sponsor:
  #1  
Old May 1st, 2003, 11:22 PM
Darrin Ward's Avatar
Darrin Ward Darrin Ward is offline
Founder, SEOChat.com :)
SEO Chat Beginner (1000 - 1499 posts)
 
Join Date: Dec 2002
Location: Miami, Florida
Posts: 1,439 Darrin Ward User rank is Corporal (100 - 500 Reputation Level)Darrin Ward User rank is Corporal (100 - 500 Reputation Level)Darrin Ward User rank is Corporal (100 - 500 Reputation Level)Darrin Ward User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 17 h 5 m 20 sec
Reputation Power: 12
One Pop-Up Per Visitor Script

As mentioned in another thread, having too many pop-up's is very annoying. Here is a script that will do ONLY 1 pop-up per visit. This script sets a temporary cookie to track if the pop-up (actually it's a pop-under) has already been shows.

This is the javascript code:
Code:
var popunder="/pu.html"
var winfeatures="width=468,height=80,scrollbars=0,resizable=0,toolb  ar=0,location=0,menubar=0,status=0,directories=0"
var once_per_session=1
function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(off  set, end))
      }
   }
  return returnvalue;
}

function loadornot(){
if (get_cookie('popunder')==''){
loadpopunder()
document.cookie="popunder=yes"
}
}
function loadpopunder(){
win2=window.open(popunder,"",winfeatures)
win2.blur()
window.focus()
}
if (once_per_session==0)
loadpopunder()
else
loadornot()


This code can be modified in several ways:

1. The line var popunder="/page.html" can be modified so that the new window will contain the advert / page of your choice.

2. On the second line of code, the "width" and "height" of the popup can be modified. This sets the width and height of the pop-up.

3. Other window features can be specified as seen on the second line of code. For example if you want the window to have scrollbars, change "scrolbars=0" to "scrollbars=1".

Hope this is useful to some.
__________________
Darrin J. Ward, a Professional SEO Consultant and Original Founder of SEO Chat (this site), Google Dance Tool & some other cool stuff!

* Rankings Reporter - Track your Website's Keyword Rankings in Google & Yahoo.

* ChatButton - Free AJAX Chatboxes to embed onto any Webpage - super-easy copy/paste setup!.

Reply With Quote
  #2  
Old May 28th, 2003, 04:05 PM
twintowersnet's Avatar
twintowersnet twintowersnet is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: NYC, NY
Posts: 34 twintowersnet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Just what I was looking for.

Thanks Darrin!
__________________
Fred@Twin-Towers.net

Reply With Quote
  #3  
Old May 28th, 2003, 04:28 PM
twintowersnet's Avatar
twintowersnet twintowersnet is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: NYC, NY
Posts: 34 twintowersnet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Is there anyway to make the pop up be a full new window?

Thanks

Reply With Quote
  #4  
Old June 10th, 2003, 04:48 PM
c4 c4 is offline
Junior Member
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 16 c4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by "twintowersnet"

Is there anyway to make the pop up be a full new window?


Setting

var winfeatures="width=468,height=80,scrollbars=0,resizable=0,toolb ar=0,location=0,menubar=0,status=0,directories=0"

to

var winfeatures=""

should do it (you will get a "normal" browser window with all the menus, scrollbars and toolbars).

If you want a full findow with NO scrollbars/toolbars/menus set it to

var winfeatures="scrollbars=0,resizable=0,toolbar=0,location=0,menu bar=0,status=0,directories=0"

Reply With Quote
  #5  
Old July 23rd, 2003, 11:17 AM
gemini gemini is offline
Junior Member
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Myrtle Beach, SC
Posts: 4 gemini User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to gemini Send a message via Yahoo to gemini
Hello everybody,
I didn't work with js a lot, so I have a questions about the script:
I'm using php header and if I use this script in it to pop-up my guestbook it will pop it up every time when somebody sees my first (index) page. What do I need to add to pop it up everywhere (of course it hasn't been done before) - well, including it in php header will do that - but I don't want it poping up on the index page (before visitors can actually see the website - if you know what I mean )

Thanks

Reply With Quote
Reply

Viewing: SEO Chat ForumsOtherSEO Scripts > One Pop-Up Per Visitor Script


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT