Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Location
    Bay Area, California
    Posts
    19
    Rep Power
    0

    1 link, 2 frames


    Okay, so I want a link to change both frames.

    I want it to change Frame "A" to "C"
    and frame "B" to "D"

    The link is in frame "B"


    Any suggestions?
  2. #2
  3. Retired
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Finland
    Posts
    9,115
    Rep Power
    2498
    HTMLGoodies - should be able to work it out from that tutorial.
    If you are still stuck, post relevant code. good luck.

    Cheers,
    Jamie

    >_ My Music Blog | Losing weight @notsoheavyblog | My Tweets

    __________________

    Let the might of your compassion arise to bring a quick end
    to the flowing stream of the blood and tears .....
    Please hear my anguished words of truth.

    __________________
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Location
    Bay Area, California
    Posts
    19
    Rep Power
    0
    Yeah, I"m still having the same problem I was before.

    the first frame changes, but the second one gets an error (the link is in the second frame)

    Code:
     <a href="2" onClick="parent.frames[0].location='../../01.html'"; 
    "parent.frames[1].location='../01/01.html'">Next</a>

    (the "a href=" was originally "#" then "1" -- trying to see what was wrong)

    It's that second "parent.frames[1]" that's not working. I know the file path is right (I've checked it over and over), so I'm not quite sure what's going wrong...
  6. #4
  7. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,134
    Rep Power
    4310
    Code:
     <a href="#" onClick="parent.frames[0].location.href='../../01.html'"; 
    "parent.frames[1].location.href='../01/01.html';return false;">Next</a>
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  8. #5
  9. Professional Lay-A-Bout
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    Ann Arbor, Michigan
    Posts
    302
    Rep Power
    16
    Originally Posted by Raymei
    Code:
     <a href="2" onClick="parent.frames[0].location='../../01.html'"; 
         "parent.frames[1].location='../01/01.html'">Next</a>
    Your quotes are out of place. Remember that the event method has to have a matched pair of quotes. If you have two statements, they must have the semi-colon between them, which you do, but both statements must still be inside the quote marks. Try this instead.
    Code:
     <a href="#" onClick="parent.frames[0].location='../../01.html'; 
          parent.frames[1].location='../01/01.html'; return false">Next</a>
    Note that I've added a third statement in the event handler. return false tells the browser that after it's executed the event handler it should not go to the url within the link.
    Thomas

    Dogs and computers both do everything you tell them.
    But computers don't like their tummies rubbed.
  10. #6
  11. Cunning Linguist
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2003
    Location
    I used to live at home, now I stay at the house
    Posts
    10,166
    Rep Power
    2043
    You don't need the return false if you have a '#' as the href.

    In fact, better than the hash, you should have the following:
    Code:
    href="JavaScript:;"
    Support requests via PM will be ignored!
    Read These: The General Rules Thread | The General FAQ Thread | NEW USERS - How to post a question

  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Location
    Bay Area, California
    Posts
    19
    Rep Power
    0
    ah!
    Thank you!

    God, I hate that (those little tiny things you know but don't pay attention to?) T_T;;
    Thanks a lot! It works fine now!
  14. #8
  15. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,134
    Rep Power
    4310
    Cheif, the "#" causes the page to scroll to the top in may browsers.

    You're right, "javascript:;" is better. Not only does it not cause the page to scroll but it also informs a user that they need to have JavaScript enabled to use it.
  16. #9
  17. Professional Lay-A-Bout
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    Ann Arbor, Michigan
    Posts
    302
    Rep Power
    16
    Wouldn't using javascript: as the link violate accessability issues? Sec. 508 requires that an alternate method to access content must be provided when a script is used to provide it.

    With that in mind, even my "#" doesn't qualify since it isn't providing for an alternate way for the content to be displayed. The url of at least 1 of the frames and a target should have been included instead.

    At least I think that's right.

    Comments on this post

    • kk5st agrees : Aside from accessibility issues, scripts should always fail gracefully
    Thomas

    Dogs and computers both do everything you tell them.
    But computers don't like their tummies rubbed.
  18. #10
  19. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,134
    Rep Power
    4310
    True, doing that would not meet Sect. 508 requirements.

    I always recommend SSI or PHP includes over frames anyway.

    Why Frames Are Bad
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Location
    Bay Area, California
    Posts
    19
    Rep Power
    0
    one more question (as far as this goes...)

    How would you go about changing 2 frames within an inlineframe? (the link being on the outside of the frame)
  22. #12
  23. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,134
    Rep Power
    4310
    It would be easier if you showed us your code.
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  24. #13
  25. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Location
    Bay Area, California
    Posts
    19
    Rep Power
    0
    Code:
     <a href="#" onClick="parent.frames[1].location='http://books.dreambook.com/raymei/gahtla.sign.html'; 
         parent.frames[2].location='http://books.dreambook.com/raymei/gahtla.html'; return false">Guestbook</a>

    I've got the page, then an inlineframe (divided into two frames).
    Page = frame[0]
    "left"frame = frame[1]
    "right"frame = frame[2] right?


    I'm still pretty new to this whole thing so I appologize for any "bang-my-head-against-a-wall" worthy frustrations
  26. #14
  27. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,134
    Rep Power
    4310
    I was hoping to see the code for the frames.

    So you have a page that has an iframe that contains a page that has two frames in it?
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  28. #15
  29. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Location
    Bay Area, California
    Posts
    19
    Rep Power
    0
    Oh!
    Holy crap, I got it to work XD Thanks, though!

    Here's the code i used:
    Code:
    <a href="#" onClick="inlineframe.left.location='http://books.dreambook.com/raymei/gahtla.sign.html'; 
          inlineframe.right.location='http://books.dreambook.com/raymei/gahtla.html'; return false">Guestbook</a>

    Thanks guys!
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo