Results 1 to 9 of 9

Thread: does any one have a pop up html code please

  1. #1
    I Giggle Like A Girl Every Time I Hear The Word 'Watersports'
    Join Date
    Nov 2008
    Posts
    885

    does any one have a pop up html code please

    i want to have a pop up console on my site so that when someone closes out his browser window a small pop up opens up but only if they close the internet explorer window if they click on a link i do not want the pop up to open


  2. #2
    I'm not gay; I'm British! cezam's Avatar
    Join Date
    Jul 2008
    Location
    Czech Republic
    Posts
    50
    Code:
    <html>
    <head>
    <script language="javascript">
    function popup() {
    	var page = "page_to_popup.html";
    	windowprops = "height=700,width=800,location=center,scrollbars=yes,menubars=no,toolbars=no,resizable=no";
    	window.open(page, "Pop", windowprops);
    }
    </script>
    </head>
    <body onunload="popup()">
    <p>Close this window to show the popup</p>
    </body>
    </html>
    This is the easiest way to do it, but it will most probably be caught by any decent popup blocker...
    Last edited by cezam; 03-14-2009 at 04:32 PM. Reason: typo

    50-60% revshare
    E-mail cezam@dannyrayonline.com // icq 353-235-249


  3. #3
    Writer to the Stars Teaser's Avatar
    Join Date
    Feb 2009
    Location
    MO
    Posts
    299
    HI Rich;

    Yes, and this script allows you to set a cookie that won't popup your ad more then once in a set number of days, so that you aren't annoying return surfers

    Here you go....

    <script language="JavaScript">
    /*
    One Time Popup Script
    By Website Abstraction (http://www.wsabstract.com) and
    Java-Scripts.net (http://www.java-scripts.net)
    Over 200+ free scripts here!
    */


    //number of days the cookie should
    //last (0 will cause it to always pop up)
    var expDays = 1;

    //url of the page you want to popup
    var page = "http://www.yoursitehere.com";

    var windowprops = "width=650, height=500, location=yes, toolbar=no, menubar=no, scrollbars=yes, resizable=yes";

    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 getCookieVal (j);

    i = document.cookie.indexOf(" ", i) + 1;

    if (i == 0) break;

    }

    return null;

    }

    function SetCookie (name, value) {
    var argv = SetCookie.arguments;
    var argc = SetCookie.arguments.length;
    var expires = (argc > 2) ? argv[2] : null;
    var path = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;
    var secure = (argc > 5) ? argv[5] : false;
    document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");

    }

    function DeleteCookie (name) {
    var exp = new Date();
    exp.setTime (exp.getTime() - 1);
    var cval = GetCookie (name);
    document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();

    }

    var exp = new Date();
    exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

    function amt(){
    var count = GetCookie('count')

    if(count == null) {
    SetCookie('count','1')
    return 1
    } else {
    var newcount = parseInt(count) + 1;
    DeleteCookie('count')
    SetCookie('count',newcount,exp)
    return count

    }

    }

    function getCookieVal(offset) {
    var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1)
    endstr = document.cookie.length;
    return unescape(document.cookie.substring(offset, endstr));
    }



    function checkCount() {
    var count = GetCookie('count');
    if (count == null) {
    count=1;
    SetCookie('count', count, exp);
    window.open(page, "", windowprops);
    } else {
    count++;
    SetCookie('count', count, exp);
    }

    }

    window.onload=checkCount
    </script>
    :pinkylove:Sex is like air, you don't notice you need it until you don't have any!:pinkylove:


  4. #4
    You do realize by 'gay' I mean a man who has sex with other men?
    Join Date
    Oct 2003
    Location
    New Orleans, Louisiana.
    Posts
    21,635
    Does anyone know if either of these will work with pop-up blockers installed?

    Regards,

    Lee


  5. #5
    I like cocks better than you!
    Join Date
    Mar 2008
    Posts
    596
    Quote Originally Posted by Rich View Post
    i want to have a pop up console on my site so that when someone closes out his browser window a small pop up opens up but only if they close the internet explorer window if they click on a link i do not want the pop up to open
    This is a really good site to bookmark, it's more for HTML. But on a lot of the things you can code into others.

    http://www.htmlbasix.com


  6. #6
    Writer to the Stars Teaser's Avatar
    Join Date
    Feb 2009
    Location
    MO
    Posts
    299
    Quote Originally Posted by Lee View Post
    Does anyone know if either of these will work with pop-up blockers installed?

    Regards,

    Lee
    I haven't tested mine with pop up blockers. I stopped using pop-ups awhile back
    :pinkylove:Sex is like air, you don't notice you need it until you don't have any!:pinkylove:


  7. #7
    blah blah blah...
    Join Date
    Nov 2003
    Location
    Toronto, ON
    Posts
    670
    i've been looking for a reliable pop-up script that wont be detected by pop-up blockers...but i think those two scripts will get detected and blocked.

    nextdoorstudios have these great pop-ups. does anyone know how they work? just enter any of their sites and it comes up after you click the enter button, for eg http://www.masonwyler.com/

    allan


  8. #8
    How long have you been gay?
    Join Date
    Apr 2008
    Posts
    11
    hehh the simplest one written by me

    <script>window.open('http://www.gayporntraffic.com/');</script>

    Insert html markup...


    bruno at altagay.com


  9. #9
    I Giggle Like A Girl Every Time I Hear The Word 'Watersports'
    Join Date
    Nov 2008
    Posts
    885
    thanks so much for the help


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •