onload changing class in other frame
Hi,
I have 2 frames, framemain and frameright.
Clicking on the link <a href="lap003.htm" target="framemain"><span id="p003" name="p003" class="looknormal"> 3</span></a> in main changes the content of frameright.
Onload of the new right page I want to change the style of 'p003' in main page.
I can do it this way:
<body onload="javascript:parent.document.getElementById( 'p003').style.background='url(arrowon.gif)';javasc ript:parent.document.getElementById('p003').style. fontWeight='bold';javascript:parent.document.getEl ementById('p003').style.color='white';">
and there I used also the onunload="" to reverse the style. It works, but it means a lot of code having over 100 pages.
Change classes form "looknormal" to "looknew" during onLoad would be better, but I didn't succes.
Can someone help me with this?
thanks, Jet
|