Results 1 to 6 of 6

Thread: Help with pop-up..

  1. #1
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with pop-up..

    Does anyone know a code which closes a certain pop-up of a visitor when they enter your site?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, you say 'certain popup'. Which popup is it? Where did it come from? Was it opened with javascript and is it represented by a variable name accessible to the page that you want to have close it?

    If the answer is yes:

    Code:
    var_name.close();
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No, it wasn't opened my javascript. Just a pop-up that the visitor already has opened when they visit the site.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I guess it isn't really a 'certain pop-up' then, is it?. It might not have to have been opened by your script, just some script and, your page would need a way to access the pop up. This is unlikely to be possible but, might be. The more specifics that are certain about the pop up, the more likely it would be that a method of closing it could be found. If it is just any old pop up that the user just happens to have open from some other site that they were on, the best that you could do would be to entice the user into opening a pop up on your page and hope that their browser was set to reuse windows for that sort of thing. Once the pop up window is populated with your content, you may be able to close it, or at least prompt the user to do so.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Is there any special code for this?
    I know the url for the pop-up.. if that helps.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Amyism View Post
    Is there any special code for this?
    I know the url for the pop-up.. if that helps.
    Not too much.

    I already gave you the code, even more basically it is:

    Code:
    window.close();
    The trick is to find a way to grab window and close it that doesn't violate any of the various security restrictions that probably apply to this type of cross domain scripting.

    As I say, this might not be possible. The only way to figure out if it can be done would be to play with the actual conditions that exist at the time that this undesirable pop-up is there and your sight is just loading.

    Can you provide a link and instructions as to how to proceed to your site from that link in such a way as the undesirable pop up exists as one enters your site?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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