A
Aaron Prohaska
Can anyone tell me how to make the following code work in IE on the Mac,
specifically OS X?
===========================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body onload="fillLists()">
<form name="logic_form" action="">
<div><span id='Bold'>SIZE</span></div>
<div>
<select name='Size40668'
onChange="addOptionsColor40668(this.selectedIndex)">
<option value=16 Selected>16in</option>
<option value=18 >18in</option>
</select> center-to-top
</div>
<div><span id='Bold'>Color</span></div>
<div><select name='Color40668'><option value=""></option></select></div>
<div><span id='Bold'>SIZE</span></div>
<div>
<select name='Size27961'
onChange="addOptionsColor27961(this.selectedIndex)">
<option value=16 Selected>16in</option>
<option value=18 >18in</option>
</select> center-to-top
</div>
<div><span id='Bold'>Color</span></div>
<div><select name='Color27961'><option value=""></option></select></div>
<script language="JavaScript">
<!--
var NS4 = (navigator.appName == "Netscape" &&
parseInt(navigator.appVersion) < 5);
var NSX = (navigator.appName == "Netscape");
var IE4 = (document.all) ? true : false;
var Color40668 = new Array();
Color40668[0] = new Array("Black Anodized", "Blue Anodized", "Red
Anodized");
Color40668[1] = new Array("Black Anodized", "Blue Anodized", "Red
Anodized");
function addOptionsColor40668(regionID)
{
if (NSX) {
addOptionsNSColor40668(regionID);
} else if (IE4) {
deleteOptionsColor40668();
addOptionsIEColor40668(regionID);
}
}
function addOptionsNSColor40668(regionID)
{
var count = 1;
document.logic_form.Color40668.length = 1;
for (var x=0; x < Color40668[regionID].length; x++) {
document.logic_form.Color40668.options[count] = new
Option(Color40668[regionID][x], Color40668[regionID][x]);
count++;
}
}
function addOptionsIEColor40668(regionID)
{
var newOpt;
for ( var x = 0; x < Color40668[regionID].length; x++ ) {
newOpt = document.createElement("option");
newOpt.value = Color40668[regionID][x];
newOpt.text = Color40668[regionID][x];
document.logic_form.Color40668.add(newOpt);
}
}
function deleteOptionsColor40668()
{
var selLength = document.logic_form.Color40668.options.length;
for ( var i = selLength; i >= 0; i--) {
document.logic_form.Color40668.remove(i);
}
}
var Color27961 = new Array();
Color27961[0] = new Array("Black Anodized", "Blue Anodized", "Red
Anodized");
Color27961[1] = new Array("Black Anodized", "Blue Anodized", "Red
Anodized");
function addOptionsColor27961(regionID)
{
if (NSX) {
addOptionsNSColor27961(regionID);
} else if (IE4) {
deleteOptionsColor27961();
addOptionsIEColor27961(regionID);
}
}
function addOptionsNSColor27961(regionID)
{
var count = 1;
document.logic_form.Color27961.length = 1;
for (var x=0; x < Color27961[regionID].length; x++) {
document.logic_form.Color27961.options[count] = new
Option(Color27961[regionID][x], Color27961[regionID][x]);
count++;
}
}
function addOptionsIEColor27961(regionID)
{
var newOpt;
for ( var x = 0; x < Color27961[regionID].length; x++ ) {
newOpt = document.createElement("option");
newOpt.value = Color27961[regionID][x];
newOpt.text = Color27961[regionID][x];
document.logic_form.Color27961.add(newOpt);
}
}
function deleteOptionsColor27961()
{
var selLength = document.logic_form.Color27961.options.length;
for ( var i = selLength; i >= 0; i--) {
document.logic_form.Color27961.remove(i);
}
}
function fillLists() {
var regionID = 0;
addOptionsColor40668(regionID);
addOptionsColor27961(regionID);
}
//-->
</script>
</form>
</body>
</html>
===========================================================
Regards,
Aaron Prohaska
-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-
Wrench Science Inc.
http://www.wrenchScience.com/
Phone: 510.841.4748 x206
Fax: 510.841.4708
-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-
specifically OS X?
===========================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body onload="fillLists()">
<form name="logic_form" action="">
<div><span id='Bold'>SIZE</span></div>
<div>
<select name='Size40668'
onChange="addOptionsColor40668(this.selectedIndex)">
<option value=16 Selected>16in</option>
<option value=18 >18in</option>
</select> center-to-top
</div>
<div><span id='Bold'>Color</span></div>
<div><select name='Color40668'><option value=""></option></select></div>
<div><span id='Bold'>SIZE</span></div>
<div>
<select name='Size27961'
onChange="addOptionsColor27961(this.selectedIndex)">
<option value=16 Selected>16in</option>
<option value=18 >18in</option>
</select> center-to-top
</div>
<div><span id='Bold'>Color</span></div>
<div><select name='Color27961'><option value=""></option></select></div>
<script language="JavaScript">
<!--
var NS4 = (navigator.appName == "Netscape" &&
parseInt(navigator.appVersion) < 5);
var NSX = (navigator.appName == "Netscape");
var IE4 = (document.all) ? true : false;
var Color40668 = new Array();
Color40668[0] = new Array("Black Anodized", "Blue Anodized", "Red
Anodized");
Color40668[1] = new Array("Black Anodized", "Blue Anodized", "Red
Anodized");
function addOptionsColor40668(regionID)
{
if (NSX) {
addOptionsNSColor40668(regionID);
} else if (IE4) {
deleteOptionsColor40668();
addOptionsIEColor40668(regionID);
}
}
function addOptionsNSColor40668(regionID)
{
var count = 1;
document.logic_form.Color40668.length = 1;
for (var x=0; x < Color40668[regionID].length; x++) {
document.logic_form.Color40668.options[count] = new
Option(Color40668[regionID][x], Color40668[regionID][x]);
count++;
}
}
function addOptionsIEColor40668(regionID)
{
var newOpt;
for ( var x = 0; x < Color40668[regionID].length; x++ ) {
newOpt = document.createElement("option");
newOpt.value = Color40668[regionID][x];
newOpt.text = Color40668[regionID][x];
document.logic_form.Color40668.add(newOpt);
}
}
function deleteOptionsColor40668()
{
var selLength = document.logic_form.Color40668.options.length;
for ( var i = selLength; i >= 0; i--) {
document.logic_form.Color40668.remove(i);
}
}
var Color27961 = new Array();
Color27961[0] = new Array("Black Anodized", "Blue Anodized", "Red
Anodized");
Color27961[1] = new Array("Black Anodized", "Blue Anodized", "Red
Anodized");
function addOptionsColor27961(regionID)
{
if (NSX) {
addOptionsNSColor27961(regionID);
} else if (IE4) {
deleteOptionsColor27961();
addOptionsIEColor27961(regionID);
}
}
function addOptionsNSColor27961(regionID)
{
var count = 1;
document.logic_form.Color27961.length = 1;
for (var x=0; x < Color27961[regionID].length; x++) {
document.logic_form.Color27961.options[count] = new
Option(Color27961[regionID][x], Color27961[regionID][x]);
count++;
}
}
function addOptionsIEColor27961(regionID)
{
var newOpt;
for ( var x = 0; x < Color27961[regionID].length; x++ ) {
newOpt = document.createElement("option");
newOpt.value = Color27961[regionID][x];
newOpt.text = Color27961[regionID][x];
document.logic_form.Color27961.add(newOpt);
}
}
function deleteOptionsColor27961()
{
var selLength = document.logic_form.Color27961.options.length;
for ( var i = selLength; i >= 0; i--) {
document.logic_form.Color27961.remove(i);
}
}
function fillLists() {
var regionID = 0;
addOptionsColor40668(regionID);
addOptionsColor27961(regionID);
}
//-->
</script>
</form>
</body>
</html>
===========================================================
Regards,
Aaron Prohaska
-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-
Wrench Science Inc.
http://www.wrenchScience.com/
Phone: 510.841.4748 x206
Fax: 510.841.4708
-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-