|
-
Nov 24th, 2006, 09:27 AM
#1
Thread Starter
Member
Reference Anchor in other frame
This should be simple but I can't find the syntax. I have an achor in an html page :-
<A name=Test1 href="Background.html" target="main">Background</A>
I want to change the color of the font from a page in a different frame (oh no Frames!) using a Javascript command such as :-
parent.leftbar.Test1.style.color='#000080'; //Leftbar being the name of the other frame.
Anyway, all I get is an error about a null object so I guess this isn't the way to reference it.
Last edited by Uncle Bob; Nov 24th, 2006 at 10:04 AM.
Reason: spelling error
-
Nov 24th, 2006, 10:01 AM
#2
Re: Reference Anchor is other frame
Try
window.frames['leftbar'].document.links['Test1'].style.color = '#000080';
-
Nov 24th, 2006, 10:04 AM
#3
Thread Starter
Member
Re: Reference Anchor is other frame
"Error: window.frames['leftbar'].document is null or not an object"
Been getting this all day.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|