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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation One button..two links.

    Okay I'm assuming to the best of my knowladge to pull this off I would use something to the extent of a mouseOver with an OnClick in java script, but I have one issue with java..if it's not cut and paste..I suck at it..so here goes.

    I have two Iframes. One on top, one below.
    The one on top shows an image.
    The one below shows information.
    When they click on a link to change the information, I also want that link to change the image in the iframe above.

    Help?

  • #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
    Code:
    <a href="linktoinfo.html" target="nameofbottomframe" onclick="parent.frames['nameoftopframe'].location='someotherpage.html'">Two Links</a>
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Alright, I tested it out, and it's not targeting the first link to content, it's opening a new window all together.

    I put up the test at
    http://SympliG0thic.com/TestLink.html

  • #4
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb

    That coding is for actual frames not IFrames which is what I'm using. I found this [http://www.samisite.com/test-csb2nf/id82.htm]in reference finally, aparently if you want to do this in IFrames you have to use java.

    But even using their code I can't get mine to work >.< just says error on page when I click the link

    Line: 7
    Char: 1
    Error: 'parent.FRAME1.location' is null or not an object
    Code: 0
    URL: http://symplig0thic.com/TestLink.html
    And upon further investigation it seems like doing this in IFrames is more of a pain in the arse than it's worth..but I know it can be done and functionally so..however with the magnitude of this site, I'm not sure if the hassle will be worth it.
    Last edited by SympliG0th; 10-14-2006 at 10:07 AM.

  • #5
    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
    What I gave you would work, you just have to understand what a name of an frame or iframe really is. It seems that you don't. Your second iframe code has name="main" but so does your first one so your second iframe needs to be
    Code:
      <iframe width="150" height="315" src="content.html" name="main2" id="main2" border="0" frameborder="0" scrolling="auto" allowtransparency="true"> 
      </iframe>
    not
    Code:
      <iframe width="150" height="315" src="content.html" name="main" id="main2" border="0" frameborder="0" scrolling="auto" allowtransparency="true"> 
      </iframe>
    Now what I gave you would work IF you used the right iframe names which you didn't.
    Code:
    <a href="linktoinfo.html" target="main" onclick="parent.frames['main2'].location='someotherpage.html'">Two Links</a>
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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