View Single Post
 
Old October 15th, 2004, 04:45 AM
jet jet is offline
Registered User
 
Join Date: Oct 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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">&nbsp;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