Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9

Thread: IFrame link

  1. #1
    New to the CF scene
    Join Date
    Jul 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IFrame link

    I have an iframe from TryItOn.aspx called iFrameTryItOn. There are links in the IFrames. It goes back to TryItOn.aspx. Unfortunately, it opens the the page inside the IFrame. Is there a way around?

  • #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    don't use an iframe, use some CSS to look like an iframe.....

    then when you click a link inside the pseudo "iframe", the link will refresh the whole page, not just the "iframe" window....

    Like this: http://www.citrusmoon.net/miscitems/mimic/this2.html.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #3
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Or something like parent.location.href="TryItOn.aspx" unless you are wanting a new window?
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #4
    New to the CF scene
    Join Date
    Jul 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't know that you can do that in css. Is it hard to do? Do you have a sample code? I don't know where to begin. I'll try to find one.

    I'm going to try parent.location.href too.

  • #5
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why not use -

    <a href="link.html" target="_top">Link</a>

    ... no need for CSS/Javascript.

    You can also use "_parent" to go to the immediate parent of the iFrame.

  • #6
    New to the CF scene
    Join Date
    Jul 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried _parent, _top, and _search. It does not work.

  • #7
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My mistake, I think targetting is only for frames, not iFrames.

    You will need javascript then as Mr J said.

    <a href="#" onclick="window.location.href='yourpage.html'">

  • #8
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    <a href="#null" onclick="parent.location.href='yourpage.htm'">CLICK</a>

    Or

    <a href="yourpage.htm" target="_top">CLICK</a>

    Both the above work
    Last edited by Mr J; 07-10-2005 at 09:23 PM.
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #9
    New to the CF scene
    Join Date
    Jul 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It works. Thanks guys.


  •  

    Posting Permissions

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