V
Vernon Peppers
I know that there are already a bunch of these requests in the
newsgroup, but no one has answered one that would help me. I have a
site that uses Javascript, http://www.namemaker.com, and one of my
pages doesn't work properly. To view the page, go to the site, select
"100% Woven labels", and select one of the "Buy" buttons. This brings
you to the color selection screen. I have script functions so that
when the user clicks a color, the script puts a box around the user's
choice, and sets the hidden field to the chosen color. It works on
PC's IE and NS. It works on Mac's, NS. On Mac's with IE, nothing
happens when you click (or so I assume from the error reports that the
users send.)
The code that does this is:
<script language="javascript">
<!--
var a, b, c, key;
a={
0:'cream',
1:'white',
2:'pink',
3:'yellow',
4:'lightgray',
5:'lightblue',
6:'lightred',
7:'lightgreen',
8:'navy',
9:'black',
10:'redwine',
11:'darkgreen',
12:'darkgray'};
b={
0:'tbrown',
1:'tred',
2:'tblack',
3:'tgreen',
4:'trose',
5:'tnavy',
6:'tgoldmetallic',
7:'tgoldenyellow',
8:'tsilver',
9:'tviolet',
10:'twhite',
11:'tgray',
12:'tskyblue'};
c={
0:'No',
1:'No',
2:'Yes',
3:'No',
4:'No',
5:'Yes',
6:'No',
7:'No',
8:'No',
9:'No',
10:'No',
11:'No',
12:'No'};
function ProcessBackground(itemNo, ColorName, Dark)
{
for (key in a)
{
cellObj=document.getElementById(a[key]);
if (key==itemNo)
cellObj.style.borderWidth = 2;
else
cellObj.style.borderWidth = 0;
}
document.forms[0].BackgroundColor.value=ColorName;
for (key in b)
{
cellObj=document.getElementById(b[key]);
if ((Dark=='Yes') && (c[key]=='Yes'))
{
cellObj.style.visibility='hidden';
if (cellObj.style.borderWidth=='2px')
{
cellObj.style.borderWidth = 0;
r=ProcessText(0, 'Brown');
}
}
else
cellObj.style.visibility='visible';
}
return;
}
function ProcessText(itemNo, ColorName)
{
for (key in b)
{
cellObj=document.getElementById(b[key]);
if (cellObj.style.visibility=='visible')
{
if (key==itemNo)
cellObj.style.borderWidth = 2;
else
cellObj.style.borderWidth = 0;
}
}
document.forms[0].TextColor.value=ColorName;
return;
}
-->
</script>
How can I fix this problem? I have no Mac to test this with.
newsgroup, but no one has answered one that would help me. I have a
site that uses Javascript, http://www.namemaker.com, and one of my
pages doesn't work properly. To view the page, go to the site, select
"100% Woven labels", and select one of the "Buy" buttons. This brings
you to the color selection screen. I have script functions so that
when the user clicks a color, the script puts a box around the user's
choice, and sets the hidden field to the chosen color. It works on
PC's IE and NS. It works on Mac's, NS. On Mac's with IE, nothing
happens when you click (or so I assume from the error reports that the
users send.)
The code that does this is:
<script language="javascript">
<!--
var a, b, c, key;
a={
0:'cream',
1:'white',
2:'pink',
3:'yellow',
4:'lightgray',
5:'lightblue',
6:'lightred',
7:'lightgreen',
8:'navy',
9:'black',
10:'redwine',
11:'darkgreen',
12:'darkgray'};
b={
0:'tbrown',
1:'tred',
2:'tblack',
3:'tgreen',
4:'trose',
5:'tnavy',
6:'tgoldmetallic',
7:'tgoldenyellow',
8:'tsilver',
9:'tviolet',
10:'twhite',
11:'tgray',
12:'tskyblue'};
c={
0:'No',
1:'No',
2:'Yes',
3:'No',
4:'No',
5:'Yes',
6:'No',
7:'No',
8:'No',
9:'No',
10:'No',
11:'No',
12:'No'};
function ProcessBackground(itemNo, ColorName, Dark)
{
for (key in a)
{
cellObj=document.getElementById(a[key]);
if (key==itemNo)
cellObj.style.borderWidth = 2;
else
cellObj.style.borderWidth = 0;
}
document.forms[0].BackgroundColor.value=ColorName;
for (key in b)
{
cellObj=document.getElementById(b[key]);
if ((Dark=='Yes') && (c[key]=='Yes'))
{
cellObj.style.visibility='hidden';
if (cellObj.style.borderWidth=='2px')
{
cellObj.style.borderWidth = 0;
r=ProcessText(0, 'Brown');
}
}
else
cellObj.style.visibility='visible';
}
return;
}
function ProcessText(itemNo, ColorName)
{
for (key in b)
{
cellObj=document.getElementById(b[key]);
if (cellObj.style.visibility=='visible')
{
if (key==itemNo)
cellObj.style.borderWidth = 2;
else
cellObj.style.borderWidth = 0;
}
}
document.forms[0].TextColor.value=ColorName;
return;
}
-->
</script>
How can I fix this problem? I have no Mac to test this with.