Log in

View Full Version : onClick values



Zibba
07-13-2006, 11:24 PM
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.

Twey
07-13-2006, 11:41 PM
<a href="blahblahmovies.html" onclick="parent.frames['frameName'].document.getElementById('page').innerHTML = 'Movies';">movies</a>should, if you have a:
<span id="page"></span>inside the frame named "frameName."

Zibba
07-14-2006, 01:38 AM
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!