Closed Thread Icon

Topic awaiting preservation: Change a table's bgcolor from another frame's mouse over link. Pages that link to <a href="https://ozoneasylum.com/backlink?for=8068" title="Pages that link to Topic awaiting preservation: Change a table&amp;#039;s bgcolor from another frame&amp;#039;s mouse over link." rel="nofollow" >Topic awaiting preservation: Change a table&#039;s bgcolor from another frame&#039;s mouse over link.\

 
Author Thread
Synthetic
Paranoid (IV) Inmate

From: under your rug,
Insane since: Jul 2001

posted posted 02-06-2002 00:18

Ok, I put this together to change the background color of a frame from a different frames link mouse over, but I really like it too change the bgColor of a table on the other frame instead of the documents page bgColor... I don't think i've ever seen this done, but hey this is the Asylum right, we make the rules!!!!!! others just follow..

<script language="JavaScript">
var backColor = new Array();
backColor[0] = '#000000';
backColor[1] = '#240000';
backColor[2] = '#320808';
function changeBG(whichColor){
parent.topMain.document.bgColor= backColor[whichColor];
}</script>
-------------------------------------------------------------------------------------------
These are the image mouse overs that change the the other frames bgcolor....

<img src="images/0.jpg" WIDTH="22" HEIGHT="22" BORDER="0" alt="Black background color" onMouseOver="javascript:changeBG(0)">&nbsp;

<img src="images/1.jpg" WIDTH="22" HEIGHT="22" BORDER="0" alt="Dark Asylum Background Color" onMouseOver="javascript:changeBG(1)">&nbsp;

<img src="images/2.jpg" WIDTH="22" HEIGHT="22" BORDER="0" alt="light Asylum background color" onMouseOver="javascript:changeBG(2)">



Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-06-2002 02:41

change

document.bgcolor (which is the document's background color)

to

document.getElementById("IDofTheTable").background

And make sure you set the table's ID.

Synthetic
Paranoid (IV) Inmate

From: under your rug,
Insane since: Jul 2001

posted posted 02-06-2002 17:57

Thanks a bunch

« BackwardsOnwards »

Show Forum Drop Down Menu