SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Member
    Join Date
    Jan 2001
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    I would like to know if there is a way to place some type of javascript within a frameset to make sure all pages in that frameset will kill any popups that may be on the pages within the frameset, without putting any javascript actually on the pages that load in the frameset.

    Wow, that is like a tongue twister. Anyways any help, or ideas to help me accomplish something like this would be greatly appreciated!

    Best Regards,
    shawn

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    That's not only a tongue twister, it's a mind bender!

    Any chance you could more clearly explain what you're trying to accomplish? Perhaps if you could describe the problem you're trying to solve...
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  3. #3
    SitePoint Member
    Join Date
    Jan 2001
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I have a page that consists of two frames a top frame and main frame. This page pops up when someone leaves my site, and in the main frame a random site is displayed. Sometimes the site displayed inside the main frame also has a pop-up window in it. I am trying to make sure if the site displayed in the main frame does have a pop-up within it that it is disabled, as I do not want another pop-up opening after they close my pop-up window.

    Now with that said, I cannot place any code within the sites that are displayed in the main frame to make sure the pop-ups are disabled, so I need to find a way to disable them by placing code within the Frameset of my pop-up window that will disable any pop-ups from the main frame. If this is possible let me know I would appreciate it.

    Thanks for your help, and I hope this is a better description for what I am trying to accomplish.

    Shawn

  4. #4
    SitePoint Zealot SoldierMail's Avatar
    Join Date
    Aug 2000
    Location
    South Carolina
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds like your on a free server. If you can then I would suggest moving your site to a paid server. This will give you total control over your domain.

  5. #5
    SitePoint Member
    Join Date
    Jan 2001
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, I am not on a free server. The pop-up is mine. When someone leaves a section of my site a pop-up window pops up and I am trying to prevent other pop-up windows popping up within my pop-up.

    Shawn

  6. #6
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately, this just isn't possible. For security reasons, you can't affect or restrict a script on a page that is not part of your site.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  7. #7
    SitePoint Member
    Join Date
    Jan 2001
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    It is from my site though. For example say a member uses our pop-up code and they place the code on their pages. If they place the code on a page that is served in our pop-up pages then another window will pop-up again due to our pop-up code on their pages.

  8. #8
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    So you don't want to prevent all pop-ups -- you just want to prevent pop-ups due to people who have cut-and-pasted your pop-up code into their sites? I thought you said you had no control over the code of the pages you are trying to prevent pop-ups on. If they're cutting-and-pasting your code, then you do have control!
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  9. #9
    SitePoint Member
    Join Date
    Jan 2001
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What I want to do is this:

    STOP ALL POP-UPS WITHIN MY POP-UP, WHICH CONSISTS OF TWO FRAMES. THE MAIN FRAME DISPLAYS A MEMBERS SITE, WHICH THEY MAY HAVE PLACED OUR POP-UP CODE ON, AND I WOULD LIKE TO PREVENT THESE POP-UPS FROM POPPING UP.

    Any help on how this can be accomplished would be greatly appreciated. If someone out there knows they can accomplish this by using maybe some javascript within the frameset please e-mail me. I am willing to pay to have this accomplished, or I will just have to learn myself how this can be done.

    "kyank" I think you are trying to help, but I don't think you understand what I am trying to do. It may be too complicated. Thanks though.

  10. #10
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I'm struggling with an apparent contradiction in your statement:

    STOP ALL POP-UPS WITHIN MY POP-UP, WHICH CONSISTS OF TWO FRAMES. THE MAIN FRAME DISPLAYS A MEMBERS SITE, WHICH THEY MAY HAVE PLACED OUR POP-UP CODE ON, AND I WOULD LIKE TO PREVENT THESE POP-UPS FROM POPPING UP.
    In the above, you start by saying that you want to prevent all pop-ups, but then you go and specify that you only want to prevent pop-ups that are a result of your members using your pop-up code.

    Assuming you do indeed want to stop all pop-ups, I'm afraid this can't be done using JavaScript alone. The only way to do this would be to use a server-side script to pre-process the page that is to be loaded in the main frame to intelligently remove any JavaScript. This would be a rather complicated script, too, I'm afraid.

    If, however, you only need to stop pop-ups occurring as a result of your members using your pop-up code -- and here I'm assuming that your members' pages are all in the same domain as yours, because otherwise this will not work -- then you could set a variable (e.g. nopopups="true") in your frameset and make your pop-up code (which your members use) check for the presence of that variabe in the parent frameset and only display the pop-up if it is not found to be present.

    That's the most that JavaScript can do for you, I'm afraid.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference


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
  •