Firstly, can I just say "Frames? Urgggh". More helpfully, can I suggest using a toolkit to abstract out some of the browser differences. My current favourite is JQuery - I can't check right now, but I'm sure it has something to make what you're doing much easier.
Greg
On Sunday, February 14, 2010, James Bensley jwbensley@gmail.com wrote:
Got a page with a frameset containing two frames (frame 0 and frame 1). The page in the top frames (frame 0) has links and each link calls the same JavaScript function parsing a different value. I want the bottom frame page (frame 1) to have its background colour set to the parsed value.
My problem is, within the JavaScript function; window.parent.frames[1].document.bgColor = "#xxxxxx"
Will change the bgcolor but I have since gotten round to implementing css. Now this won't change the bgcolor because of the css use of background-color.
However;
window.parent.frames[1].document.style.backgroundcolor = "#xxxxxx";
Doesn't change the background color. Internet Explorer shows me this error:
'window.parent.frames.1.document.style' is null or not an object
I'm stumped? Any advice would be greatly appreciated!
-- Regards, James ;)
Charles de Gaulle - "The better I get to know men, the more I find myself loving dogs." - http://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!