Click to See Complete Forum and Search --> : Controlling a Span from another Frame


BluechipJ
08-01-2003, 10:07 PM
Is there a way to control the attributes of a span in another frame?

I want the "body" frame (main info) page to change the colour of a span in the "menu" frame.

The menu has a javascript CSS rollerover that changes the colour of the text and background of that cell in the table.
When that option is clicked, I want menu option permanently set to that colour. I tried an "onclick=" but my "onmouseout=" overrides it.

MENU CODE:
<SCRIPT language=javascript>
function movein(which,html) {
which.style.background='#000066';
if (document.getElementById) document.getElementById("boxdescription").innerHTML = html
else boxdescription.innerHTML = html
}

function moveout(which) {
which.style.background='#FFFFFF';
if (document.getElementById) document.getElementById("boxdescription").innerHTML = '_'
else boxdescription.innerHTML = '_';
}
</SCRIPT>

<td onmouseover="movein(this,'Home Page.'); Choice1.style.color='#FFFFFF';" onmouseout="moveout(this); Choice1.style.color='#000066';" valign="center" width="12%" align="center"><a href="1.html" TARGET="body"><span id="Choice1">Home</span></a></td>

TIA

Mr J
08-03-2003, 05:48 AM
parent.frameNAME.spanID.style.backgroundColor