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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Loading Pages into Two Frames with One Click

    I am trying to program a single link click to load a new page into each of two frames. Half of it works, but the other half does not. My code is:

    <A HREF="javascript:location='Modified_Contents.html'
    ;parent.mainpage.location=’Bracelets.html'
    ;parent.contents.location=’Modified_Contents.html'"> Bracelets</A>

    One frame is labeled “Contents”, and the other is labeled “Mainpage”.

    The table of contents which initially opens in the “Contents” frame includes a “Bracelets” link. When this link is activated, the Bracelets page is to appear in the “Mainpage” frame and, simultaneously, a new (and somewhat different) table of contents is to be loaded into the Contents frame.

    When the Bracelets link is clicked, the new table of contents loads fine, but the Bracelets page does not load.

    It is probably obvious that I have no idea what I am doing. Any help in solving this misfire will be appreciated.

    Thanks in advance,

    Frank

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    I notice you say

    One frame is labeled “Contents”, and the other is labeled “Mainpage”.

    yet reference

    parent.mainpage.location
    parent.contents.location

    Javascript is case sensitive, you should always use lowercase to save confusion, could this be the reason.

    also your link should look like this

    <A HREF="Modified_Contents.html" onclick="parent.mainpage.location=’Bracelets.html'"> Bracelets</A>


    Check your capitals.

  • #3
    New to the CF scene
    Join Date
    May 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you for your response. You were spot on. I was suffering from inattention to case sensitivity.

    Frank


  •  

    Posting Permissions

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