SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2003
    East Coast
    0 Post(s)
    0 Thread(s)

    How to use pop-up code with frames? please help...

    Hi everyone,

    My brother needs some help with his website.

    The website sells a single product. He has 3 frames: top, left side navigation, and main content frame. He wants to put an EXIT POP-UP with a time-sensitive offer, saying lets say "order within the next 5 minutes and get X % discount". There would be a countdown clock showing, and the pop-up would close in the specified number of minutes. It also needs to be one-time-only, it can't show if the same visitor returns to the website later on.

    Anyone willing to help with scripting for that?

    Here's another problem: The pop-up can ONLY open IF the visitor exits the website WITHOUT ordering. Where/in which frame does the code go? If it's placed in the main frame, as soon as any link is clicked in it or in the side navigation frame, the pop-up would show. Same with left and top. So what do we do?

    He is using PaySystems to accept payments, and the pop-up CANNOT open if the paysystems link is clicked from the ordering page.

    Hope I'm making myself clear here. Basically, if a visitor comes, browses through different pages of the framed site, clicks the paysystems link and places an order, the pop-up CANNOT show.

    But if he browses and decides to exit the side without ordering, then the pop-up opens with the time-sensitive special offer.

    Thanks and any help would be much appreciated!

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    London, UK
    0 Post(s)
    0 Thread(s)
    There are plenty of free countdown scripts on the web... when the countdown hits 0, window.close(): (is just one)

    Cookies are your best bet for the one-time-only thing. They're not foolproof, but they'll work for the most part. Your only option other than that is to register your users in a database and log in that when they've had the offer, and simply don't give the offer to unregistered people. But that sounds a bit dumb really... JavaScript for cookies:

    You've probably got to put the code for this window in the frameset itself. I don't know how the PayPal thing works, but I assume it stays within the frame it's launched in, in which case, frameset is fine.



Posting Permissions

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