olace
09-14-2004, 06:48 PM
Can someone please help me with my javascript code to work in other browsers besides Internet Explorer. (eg firefox).
You can view the page here: http://www.factoryfestival.org/text.htm
And my problem code is:
<SCRIPT language="JavaScript">
<!--
function changetable()
{
if (document.all)
{
var box1= eval ('document.all.boxbox1.style');
var box2= eval ('document.all.boxbox2.style');
box1.backgroundColor="#DDBEBF";
box2.backgroundColor="#CCB7B8";
}
}
function changetableorig()
{
if (document.all)
{
var box1= eval ('document.all.boxbox1.style');
var box2= eval ('document.all.boxbox2.style');
box1.backgroundColor="#D4AFB0";
box2.backgroundColor="#C3A8A9";
}
}
//-->
</SCRIPT>
<td id="boxbox1" onMouseover="changetable();" onMouseout="changetableorig();" width="495" height="35" bgcolor="#D4AFB0" style="text-align:justify">
<td id="boxbox2" onMouseover="changetable();" onMouseout="changetableorig();" width="65" bgcolor="#C3A8A9" style="text-align:justify">
You can view the page here: http://www.factoryfestival.org/text.htm
And my problem code is:
<SCRIPT language="JavaScript">
<!--
function changetable()
{
if (document.all)
{
var box1= eval ('document.all.boxbox1.style');
var box2= eval ('document.all.boxbox2.style');
box1.backgroundColor="#DDBEBF";
box2.backgroundColor="#CCB7B8";
}
}
function changetableorig()
{
if (document.all)
{
var box1= eval ('document.all.boxbox1.style');
var box2= eval ('document.all.boxbox2.style');
box1.backgroundColor="#D4AFB0";
box2.backgroundColor="#C3A8A9";
}
}
//-->
</SCRIPT>
<td id="boxbox1" onMouseover="changetable();" onMouseout="changetableorig();" width="495" height="35" bgcolor="#D4AFB0" style="text-align:justify">
<td id="boxbox2" onMouseover="changetable();" onMouseout="changetableorig();" width="65" bgcolor="#C3A8A9" style="text-align:justify">