Results 1 to 3 of 3

Thread: onClick values

  1. #1
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default onClick values

    I am trying to create a link that can change a word on the page when clicked. This is because i'm using a frame to show content, but the header (showing the location and page name of what they are looking at) are outside of the frame... so i need a way to change that word + the page they are viewing at the same time.

    Would something along the lines of
    <a name="page">Home</a>

    and then in the link
    <a href="blahblahmovies.html" onClick="page.somethingsomething=Movies">movies</a>

    work at all? I would appreciate any help at all, thank you.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    <a href="blahblahmovies.html" onclick="parent.frames['frameName'].document.getElementById('page').innerHTML = 'Movies';">movies</a>
    should, if you have a:
    Code:
    <span id="page"></span>
    inside the frame named "frameName."
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you very, very much. I greatly appreciate the help! I had to change the period after the frame name portion to a semi-colon, and then it worked exactly how i wanted it to !

    Thank you again!

Bookmarks

Posting Permissions

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