SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2001
    Location
    uk
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Iframe assistance please...

    I'll try to be brief....

    Here's what I want to achieve:
    A user visit my page....
    I log their ip address and check it against the database we hold.
    If the ip address matches one in our database the user is redirected to another page.

    I have managed to create the ip database, grab the ip address, check it against the database and forward the users if the ip address matches. All this within my domain.

    The page I want them taking from is not within my domain and therefore I have attempted to use iframes to forward the user but the page within the iframe continues to spawn within the iframe.

    Is there anyway of forcing the iframe to take over the page that contains the iframe???

    I have tried target="_top" , "_TOP" and "_parent"

    Any assistance appreciated.

    Caunton

  2. #2
    SitePoint Wizard iTec's Avatar
    Join Date
    May 2001
    Location
    Sydney, Australia
    Posts
    2,243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    im a little lost, would you be able to show us the problem (code), that way we can better see what you are doing and how to fix it.

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2001
    Location
    uk
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll try...

    My forums are here: http://pub21.ezboard.com/bholidaytruthscommunity

    I have php and mysql support on my server at http://www.holidaytruths.co.uk

    Using mysql and php I can check a users ip address...

    I am unable to use php or connect to my mysql outside my domain name...

    One user has become a pain and whilst I have the ability to ban the member I am unable to stop them viewing just using the security options available to me. I do however know the ip addresses of this user.

    I have therefore created a page on my domain which catches and checks the ip address then forwards to a "You are barred" page.

    I inserted this into the pub21.ezboard page using iframe and set it to refresh to the "You are barred" page if the ip address collected matches one on our database but when the page refreshes it refreshes within the iframe space.

    Basically I want it to refresh the pub21.ezboard page to the "You are barred" page hence stopping the user from viewing the pub21.ezboard page.

    How can I allow the iframe page to control the page in which it is contained??

    The only other option available to me is to bombard the banned user with javascript pop-ups unless they leave the pub21.ezboard page.

    Hope this helps you to understand what I am attempting to achieve. It is difficult to explain

    TIA

    Caunton

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    An iframe cannot take over the page in which it is contained. It's an iframe, not a full frameset.

    You might try a javascript on the "you are barred" page which opens in "_top"

    Something like this:

    <script language=javascript type="text/javascript">
    <!--
    if (top.location != self.location) {
    top.location.href = "youarebarred.html"
    }
    //-->
    </script>
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    SitePoint Enthusiast
    Join Date
    Apr 2001
    Location
    uk
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the advice....
    I was thinking along those lines regarding the iframe...I have therefore instigated pop-ups....These will become so annoying as after receiving 2 warning messages the iframe loads the main url into the iframe...This causes the pop-ups to start all over again!!!!

    I have tested it with several willing guinea pigs using their ip addresses and all have said the only way to get out of the pop-up cycle is to leave the site, hence I have achieved my goal of blocking the site to this one individual.

    Thanks to all who assisted me and to those who couldn't maybe you have learnt something too. I most certainly have.

    Caunton


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
  •