Give help. Get help.

  • # April 6, 2013 at 6:22 pm

    Here’s the pen:

    Alert box should pop up informing the user that tickets are sold out but should happen only once. The JS is working in Opera, FF, IE, and Safari but not in Chrome. I copy/pasted this script from a site online as I am not that familiar with cookies; did I mess something up? If yes, what? If no, does anyone have a better solution?


    # April 6, 2013 at 6:59 pm

    In the script you have on codepen, you aren’t using the vars `page` and `windowprops` so you can leave them as they are or remove them.

    Anyway, it works for me, got the pop up once and the count increments every refresh. If you `alert(count);` right after

    function checkCount() {
    var count = GetCookie(‘count’);

    you can test that for yourself (but remove the non JS junk from top and bottom). It works for me on Chrome 26 by the way.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.