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 4 of 4

Thread: Iframe help

  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Location
    chicago
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Iframe help

    here's my dilemma. my Index page contains an image link that redirects to the main content page of my website. Now, my problem is i need a specific iframe on my main page to open to a specific page of content only when that specific link on my index page is clicked. Is there a way to achieve this function?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    give the iframe a name and set the target of that link to the name of the iframe
    Code:
    <a href="blah.com" target="certainiframe">blah</a>
    Code:
    <iframe src="blah2.com" name="certainiframe"></iframe>

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Location
    chicago
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks but let me clarify more

    yes that will work to link a specific frame through a link, thank you. Maybe i can explain my problem a little more clearly.
    I have the index page and the main page.
    On the main page i have 2 iframes set up to link to pre-determined pages.
    the iframe with the name Center is the frame that i am working with. But, i want these iframes to go to a different page through the buttonpress on the index page, a page not set in the code of the main page
    So i want the iframe 'center' to display a different page other than the default page that i have set in the iframe code. get what im trying to say?

    <a href="javascript:location='indext.htm';
    parent.center.location='breastaug.htm'"> ???

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    okay so u are trying to load two iframes at the same time by clicking a link that is in one of the iframed pages right? try this
    Code:
    <a href="index.html" onclick="location='index.html';parent.other.location='someotherpage.html';return false">link</a>


  •  

    Posting Permissions

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