Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Error: "Object doesn't support property or method" - Long Piece of Code...

843840Apr 8 2008 — edited Apr 8 2008
Hi,

I would like some help identifying WHY this code won't work... When I try to run it, I get an error that says "Object doesn't support property or method"..

I get it on line 1566, character 1, I think is what it said... In any case, I know what line the error is occurring on...

It's the line down in the html part of the page:

...
<SELECT NAME="Size" onChange="Size();changeSizeTitle('Size');ReadForm(this.form);" style="width:260">
<Option selected value="NaN">Select Size:</option>
<Option value="NaN">-------------------</option>
...

So, for some reason, there is a part of my script that doesn't like that I have an <option> tag in my select form....

I've looked over all of my script, and I think it SHOULD work... I've tested most of it in parts, and it all works well...

If anyone would like to help take some time and look it over and present some possible reasons, I would greatly greatly appreciate it..

Thank you.

-John

BELOW, I HAVE POSTED MY CODE.
<script language="javascript">
<!--

//////////////////////////////////////////////////////////////////////////////////////////////  DOLLAR


function Dollar (val) {  // force to valid dollar amount
var str,pos,rnd=0;
  if (val < .995) rnd = 1;  // for old Netscape browsers
  str = escape (val*1.0 + 0.005001 + rnd);  // float, round, escape
  pos = str.indexOf (".");
  if (pos > 0) str = str.substring (rnd, pos + 3);
  return str;
}


//////////////////////////////////////////////////////////////////////////////////////////////  CHK TOK


var amt,des,obj,val,op1a,op1b,op2a,op2b,itmn;

function ChkTok (obj1) {
var j,tok,ary=new Array ();       // where we parse
  ary = val.split (" ");          // break apart
  for (j=0; j<ary.length; j++) {  // look at all items
// first we do single character tokens...
    if (ary[j].length < 2) continue;
    tok = ary[j].substring (0,1); // first character
    val = ary[j].substring (1);   // get data
    if (tok == "@") amt = val * 1.0;
    if (tok == "+") amt = amt + val*1.0;
    if (tok == "%") amt = amt + (amt * val/100.0);
    if (tok == "#") {             // record item number
      if (obj1.item_number) obj1.item_number.value = val;
      ary[j] = "";                // zap this array element
    }
// Now we do 3-character tokens...
    if (ary[j].length < 4) continue;
    tok = ary[j].substring (0,3); // first 3 chars
    val = ary[j].substring (3);   // get data
    if (tok == "s1=") {           // value for shipping
      if (obj1.shipping)  obj1.shipping.value  = val;
      ary[j] = "";                // clear it out
    }
    if (tok == "s2=") {           // value for shipping2
      if (obj1.shipping2) obj1.shipping2.value = val;
      ary[j] = "";                // clear it out
    }
  }
  val = ary.join (" ");           // rebuild val with what's left
}

////////////////////////////////////////////////////////////////////////////////////////////  STOR VAL

function StorVal () {
var tag;
  tag = obj.name.substring (obj.name.length-2);  // get flag
  if      (tag == "1a") op1a = op1a + " " + val;
  else if (tag == "1b") op1b = op1b + " " + val;
  else if (tag == "2a") op2a = op2a + " " + val;
  else if (tag == "2b") op2b = op2b + " " + val;
  else if (tag == "3i") itmn = itmn + " " + val;
  else if (des.length == 0) des = val;
  else des = des + ", " + val;
}

////////////////////////////////////////////////////////////////////////////////////////////  READ FORM

function ReadForm (obj1, tst) { // Read the user form
var i,j,pos;
  amt=0;des="";op1a="";op1b="";op2a="";op2b="";itmn="";
  if (obj1.baseamt) amt  = obj1.baseamt.value*1.0;  // base amount
  if (obj1.basedes) des  = obj1.basedes.value;  // base description
  if (obj1.baseon0) op1a = obj1.baseon0.value;  // base options
  if (obj1.baseos0) op1b = obj1.baseos0.value;
  if (obj1.baseon1) op2a = obj1.baseon1.value;
  if (obj1.baseos1) op2b = obj1.baseos1.value;
  if (obj1.baseitn) itmn = obj1.baseitn.value;
  for (i=0; i<obj1.length; i++) {     // run entire form
    obj = obj1.elements; // a form element
if (obj.type == "select-one") { // just selects
if (obj.name == "quantity" ||
obj.name == "amount") continue;
pos = obj.selectedIndex; // which option selected
val = obj.options[pos].value; // selected value
ChkTok (obj1); // check for any specials

if (obj.name == "on0" || // let this go where it wants
obj.name == "os0" ||
obj.name == "on1" ||
obj.name == "os1") continue;

StorVal ();

} else
if (obj.type == "checkbox" || // just get checkboxex
obj.type == "radio") { // and radios
if (obj.checked) {
val = obj.value; // the value of the selection
ChkTok (obj1);
StorVal ();
}
} else
if (obj.type == "select-multiple") { //one or more
for (j=0; j<obj.options.length; j++) { // run all options
if (obj.options[j].selected) {
val = obj.options[j].value; // selected value (default)
ChkTok (obj1);
StorVal ();
}
}
} else
if ((obj.type == "text" || // just read text,
obj.type == "textarea") &&
obj.name != "tot" && // but not from here
obj.name != "quantity") {
val = obj.value; // get the data
if (val == "" && tst) { // force an entry
alert ("Enter data for " + obj.name);
return false;
}
StorVal ();
}
}
// Now summarize stuff we just processed, above
if (op1a.length > 0) obj1.on0.value = op1a;
if (op1b.length > 0) obj1.os0.value = op1b;
if (op2a.length > 0) obj1.on1.value = op2a;
if (op2b.length > 0) obj1.os1.value = op2b;
if (itmn.length > 0) obj1.item_number.value = itmn;
obj1.item_name.value = des;
obj1.amount.value = Dollar (amt);
if (obj1.tot) obj1.tot.value = "$" + Dollar (amt);
}


//////////////////////////////////////////////////////////////////////////////////////////// REMOVE ALL OPTIONS


function removeAllOptions(selectbox)
{
var i;
for(i=selectbox.options.length-1;i>=0;i--)
{
//selectbox.options.remove(i);
selectbox.remove(i);
}
}


//////////////////////////////////////////////////////////////////////////////////////////// REMOVE SELECT


function removeSelect(selectbox)
{
var i;
for(i=1;i>=0;i--)
{
selectbox.options.remove(i);
selectbox.remove(i);
}
}


//////////////////////////////////////////////////////////////////////////////////////////// ADD OPTION


function addOption(selectbox, value, text )
{
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;

selectbox.options.add(optn);
}


/////////////////////////////////////////////////////////////////////////////////////////// FILL SIZE


function fillSize()
{
addOption(document.drop_list.Size, "8x10 @50.00", "8in x 10in ($50.00)", "");
addOption(document.drop_list.Size, "8x12 @65.00", "8in x 12in ($65.00)", "");
addOption(document.drop_list.Size, "10x20 @80.00", "10in x 20in ($80.00)", "");
addOption(document.drop_list.Size, "12x16 @95.00", "12in x 16in ($95.00)", "");
addOption(document.drop_list.Size, "12x18 @110.00", "12in x 18in ($110.00)", "");
addOption(document.drop_list.Size, "14x18 @125.00", "14in x 18in ($125.00)", "");
addOption(document.drop_list.Size, "16x20 @140.00", "16in x 20in ($140.00)", "");
addOption(document.drop_list.Size, "18x24 @155.00", "18in x 24in ($155.00)", "");
addOption(document.drop_list.Size, "20x24 @170.00", "20in x 24in ($170.00)", "");
addOption(document.drop_list.Size, "20x30 @185.00", "20in x 30in ($185.00)", "");
addOption(document.drop_list.Size, "24x30 @200.00", "24in x 30in ($200.00)", "");
}


//////////////////////////////////////////////////////////////////////////////////////////// CHANGE SIZE TITLE


var sizeFirst = new Array(
'',
'',
'8" x 10"',
'8" x 12"',
'10" x 20"',
'12" x 16"',
'12" x 18"',
'14" x 18"',
'16" x 20"',
'18" x 24"',
'20" x 24"',
'20" x 30"',
'24" x 30"');

var sizeSecond = new Array(
'8" x 10"',
'8" x 12"',
'10" x 20"',
'12" x 16"',
'12" x 18"',
'14" x 18"',
'16" x 20"',
'18" x 24"',
'20" x 24"',
'20" x 30"',
'24" x 30"');

function changeSizeTitle(elemid){

if(document.drop_list.Size.value == 'NaN')
{
var ind = document.getElementById(elemid).selectedIndex;
document.getElementById("sizeTitle").innerHTML=sizeFirst[ind];
}

else
{
var ind = document.getElementById(elemid).selectedIndex;
document.getElementById("sizeTitle").innerHTML=sizeSecond[ind];
}
}

//////////////////////////////////////////////////////////////////////////////////////////// SIZE

function Size(){


if(document.drop_list.Size.value == 'NaN')
{
removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"NaN", "Please Select a Size First");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Size First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Size First");
}


if(document.drop_list.Size.value == '8x10 @50.00')
{
if(document.drop_list.Size.options.length == '13')
{
removeSelect(document.drop_list.Size);

removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "Select Picture Type:");
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"print", "Limited Edition Print (Included in Price)");
addOption(document.drop_list.Print,"textured +20.00", "Textured Print (Add $20.00)");
addOption(document.drop_list.Print,"painting +50.00", "Hand-Painted Picture (Add $50.00)");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");

document.main.src = "../pics/8001.jpg"
}
document.main.setAttribute('className', 'position8x10');
document.frame.setAttribute('className', 'position8x10');
document.main.width = "80";
document.main.height = "60";
document.frame.width = "80";
document.frame.height = "60";
}


if(document.drop_list.Size.value == '8x12 @65.00')
{
if(document.drop_list.Size.options.length == '13')
{
removeSelect(document.drop_list.Size);

removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "Select Picture Type:");
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"print", "Limited Edition Print (Included in Price)");
addOption(document.drop_list.Print,"textured +20.00", "Textured Print (Add $20.00)");
addOption(document.drop_list.Print,"painting +50.00", "Hand-Painted Picture (Add $50.00)");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");

document.main.src = "../pics/8001.jpg"
}
document.main.setAttribute('className', 'position8x12');
document.frame.setAttribute('className', 'position8x12');
document.main.width = "96";
document.main.height = "60";
document.frame.width = "96";
document.frame.height = "60";
}


if(document.drop_list.Size.value == '10x20 @80.00')
{
if(document.drop_list.Size.options.length == '13')
{
removeSelect(document.drop_list.Size);

removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "Select Picture Type:");
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"print", "Limited Edition Print (Included in Price)");
addOption(document.drop_list.Print,"textured +20.00", "Textured Print (Add $20.00)");
addOption(document.drop_list.Print,"painting +50.00", "Hand-Painted Picture (Add $50.00)");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");

document.main.src = "../pics/8001.jpg"
}
document.main.setAttribute('className', 'position10x20');
document.frame.setAttribute('className', 'position10x20');
document.main.width = "160";
document.main.height = "75";
document.frame.width = "160";
document.frame.height = "75";
}


if(document.drop_list.Size.value == '12x16 @95.00')
{
if(document.drop_list.Size.options.length == '13')
{
removeSelect(document.drop_list.Size);

removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "Select Picture Type:");
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"print", "Limited Edition Print (Included in Price)");
addOption(document.drop_list.Print,"textured +30.00", "Textured Print (Add $30.00)");
addOption(document.drop_list.Print,"painting +75.00", "Hand-Painted Picture (Add $75.00)");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");

document.main.src = "../pics/8001.jpg"
}
document.main.setAttribute('className', 'position12x16');
document.frame.setAttribute('className', 'position12x16');
document.main.width = "128";
document.main.height = "90";
document.frame.width = "128";
document.frame.height = "90";
}


if(document.drop_list.Size.value == '12x18 @110.00')
{
if(document.drop_list.Size.options.length == '13')
{
removeSelect(document.drop_list.Size);

removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "Select Picture Type:");
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"print", "Limited Edition Print (Included in Price)");
addOption(document.drop_list.Print,"textured +30.00", "Textured Print (Add $30.00)");
addOption(document.drop_list.Print,"painting +75.00", "Hand-Painted Picture (Add $75.00)");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");

document.main.src = "../pics/8001.jpg"
}
document.main.setAttribute('className', 'position12x18');
document.frame.setAttribute('className', 'position12x18');
document.main.width = "144";
document.main.height = "90";
document.frame.width = "144";
document.frame.height = "90";
}


if(document.drop_list.Size.value == '14x18 @125.00')
{
if(document.drop_list.Size.options.length == '13')
{
removeSelect(document.drop_list.Size);

removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "Select Picture Type:");
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"print", "Limited Edition Print (Included in Price)");
addOption(document.drop_list.Print,"textured +30.00", "Textured Print (Add $30.00)");
addOption(document.drop_list.Print,"painting +75.00", "Hand-Painted Picture (Add $75.00)");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");

document.main.src = "../pics/8001.jpg"
}
document.main.setAttribute('className', 'position14x18');
document.frame.setAttribute('className', 'position14x18');
document.main.width = "144";
document.main.height = "105";
document.frame.width = "144";
document.frame.height = "105";
}


if(document.drop_list.Size.value == '16x20 @140.00')
{
if(document.drop_list.Size.options.length == '13')
{
removeSelect(document.drop_list.Size);

removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "Select Picture Type:");
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"print", "Limited Edition Print (Included in Price)");
addOption(document.drop_list.Print,"textured +30.00", "Textured Print (Add $30.00)");
addOption(document.drop_list.Print,"painting +75.00", "Hand-Painted Picture (Add $75.00)");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");

document.main.src = "../pics/8001.jpg"
}
document.main.setAttribute('className', 'position16x20');
document.frame.setAttribute('className', 'position16x20');
document.main.width = "160";
document.main.height = "120";
document.frame.width = "160";
document.frame.height = "120";
}

if(document.drop_list.Size.value == '18x24 @155.00')
{
if(document.drop_list.Size.options.length == '13')
{
removeSelect(document.drop_list.Size);

removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "Select Picture Type:");
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"print", "Limited Edition Print (Included in Price)");
addOption(document.drop_list.Print,"textured +40.00", "Textured Print (Add $40.00)");
addOption(document.drop_list.Print,"painting +100.00", "Hand-Painted Picture (Add $100.00)");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");

document.main.src = "../pics/8001.jpg"
}
document.main.setAttribute('className', 'position18x24');
document.frame.setAttribute('className', 'position18x24');
document.main.width = "192";
document.main.height = "135";
document.frame.width = "192";
document.frame.height = "135";
}

if(document.drop_list.Size.value == '20x24 @170.00')
{
if(document.drop_list.Size.options.length == '13')
{
removeSelect(document.drop_list.Size);

removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "Select Picture Type:");
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"print", "Limited Edition Print (Included in Price)");
addOption(document.drop_list.Print,"textured +40.00", "Textured Print (Add $40.00)");
addOption(document.drop_list.Print,"painting +100.00", "Hand-Painted Picture (Add $100.00)");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");

document.main.src = "../pics/8001.jpg"
}
document.main.setAttribute('className', 'position20x24');
document.frame.setAttribute('className', 'position20x24');
document.main.width = "192";
document.main.height = "150";
document.frame.width = "192";
document.frame.height = "150";
}

if(document.drop_list.Size.value == '20x30 @185.00')
{
if(document.drop_list.Size.options.length == '13')
{
removeSelect(document.drop_list.Size);

removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "Select Picture Type:");
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"print", "Limited Edition Print (Included in Price)");
addOption(document.drop_list.Print,"textured +40.00", "Textured Print (Add $40.00)");
addOption(document.drop_list.Print,"painting +100.00", "Hand-Painted Picture (Add $100.00)");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");

document.main.src = "../pics/8001.jpg"
}
document.main.setAttribute('className', 'position20x30');
document.frame.setAttribute('className', 'position20x30');
document.main.width = "240";
document.main.height = "150";
document.frame.width = "240";
document.frame.height = "150";
}

if(document.drop_list.Size.value == '24x30 @200.00')
{
if(document.drop_list.Size.options.length == '13')
{
removeSelect(document.drop_list.Size);

removeAllOptions(document.drop_list.Print);
addOption(document.drop_list.Print,"NaN", "Select Picture Type:");
addOption(document.drop_list.Print,"NaN", "----------------");
addOption(document.drop_list.Print,"print", "Limited Edition Print (Included in Price)");
addOption(document.drop_list.Print,"textured +40.00", "Textured Print (Add $40.00)");
addOption(document.drop_list.Print,"painting +100.00", "Hand-Painted Picture (Add $100.00)");

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");

document.main.src = "../pics/8001.jpg"
}
document.main.setAttribute('className', 'position24x30');
document.frame.setAttribute('className', 'position24x30');
document.main.width = "240";
document.main.height = "180";
document.frame.width = "240";
document.frame.height = "180";
}
}

//////////////////////////////////////////////////////////////////////////////////////////// CHANGE PRINT TITLE


var printFirst = new Array(
'',
'',
'Limited Edition Print',
'Textured Print',
'Hand-Painted Picture');

var printSecond = new Array(
'Limited Edition Print',
'Textured Print',
'Hand-Painted Picture');

function changePrintTitle(elemid){

if(document.drop_list.Print.value == 'NaN')
{
var ind = document.getElementById(elemid).selectedIndex;
document.getElementById("printTitle").innerHTML=printFirst[ind];
}

else
{
var ind = document.getElementById(elemid).selectedIndex;
document.getElementById("printTitle").innerHTML=printSecond[ind];
}
}


//////////////////////////////////////////////////////////////////////////////////////////// PRINT

function Print(){


if(document.drop_list.Print.value == 'NaN')
{
removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame,"NaN", "----------------");
addOption(document.drop_list.Frame,"NaN", "Please Select a Picture Type First");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Picture Type First");
}


if(document.drop_list.Print.value == 'print')
{
if(document.drop_list.Print.options.length == '5')
{
removeSelect(document.drop_list.Print);

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame, "", "Select Frame Style:");
addOption(document.drop_list.Frame, "", "----------------");
addOption(document.drop_list.Frame,"economy", "Economy Series (Included in Price)");
addOption(document.drop_list.Frame,"classic +5.00", "Classic Series (Add $5.00)");
addOption(document.drop_list.Frame,"oak +5.00", "Oak Series (Add $5.00)");
addOption(document.drop_list.Frame,"architect +5.00", "Architect Series (Add $5.00)");
addOption(document.drop_list.Frame,"homestyle +10.00", "Homestyle Series (Add $10.00)");
addOption(document.drop_list.Frame,"corporate +10.00", "Corporate Series (Add $10.00)");
addOption(document.drop_list.Frame,"clean cut +10.00", "Clean Cut Series (Add $10.00)");
addOption(document.drop_list.Frame,"rustic II +20.00", "Rustic II Series (Add $20.00)");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Frame First");
}
}


if(document.drop_list.Print.value == 'textured +20.00' | 'textured +30.00' | 'textured +40.00')
{
if(document.drop_list.Print.options.length == '5')
{
removeSelect(document.drop_list.Print);

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame, "", "Select Frame Style:");
addOption(document.drop_list.Frame, "", "----------------");
addOption(document.drop_list.Frame,"economy", "Economy Series (Included in Price)");
addOption(document.drop_list.Frame,"classic +5.00", "Classic Series (Add $5.00)");
addOption(document.drop_list.Frame,"oak +5.00", "Oak Series (Add $5.00)");
addOption(document.drop_list.Frame,"architect +5.00", "Architect Series (Add $5.00)");
addOption(document.drop_list.Frame,"homestyle +10.00", "Homestyle Series (Add $10.00)");
addOption(document.drop_list.Frame,"corporate +10.00", "Corporate Series (Add $10.00)");
addOption(document.drop_list.Frame,"clean cut +10.00", "Clean Cut Series (Add $10.00)");
addOption(document.drop_list.Frame,"rustic II +20.00", "Rustic II Series (Add $20.00)");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Frame First");

document.main.src = "../pics/8001t.jpg"
}
document.main.src = "../pics/8001t.jpg"
}


if(document.drop_list.Print.value == 'painting +50.00' | 'painting +75.00' | 'painting +100.00')
{
if(document.drop_list.Print.options.length == '5')
{
removeSelect(document.drop_list.Print);

removeAllOptions(document.drop_list.Frame);
addOption(document.drop_list.Frame, "", "Select Frame Style:");
addOption(document.drop_list.Frame, "", "----------------");
addOption(document.drop_list.Frame,"economy", "Economy Series (Included in Price)");
addOption(document.drop_list.Frame,"classic +5.00", "Classic Series (Add $5.00)");
addOption(document.drop_list.Frame,"oak +5.00", "Oak Series (Add $5.00)");
addOption(document.drop_list.Frame,"architect +5.00", "Architect Series (Add $5.00)");
addOption(document.drop_list.Frame,"homestyle +10.00", "Homestyle Series (Add $10.00)");
addOption(document.drop_list.Frame,"corporate +10.00", "Corporate Series (Add $10.00)");
addOption(document.drop_list.Frame,"clean cut +10.00", "Clean Cut Series (Add $10.00)");
addOption(document.drop_list.Frame,"rustic II +20.00", "Rustic II Series (Add $20.00)");

removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color,"NaN", "----------------");
addOption(document.drop_list.Color,"NaN", "Please Select a Frame First");

document.main.src = "../pics/8001p.jpg"
}
document.main.src = "../pics/8001p.jpg"
}
}


//////////////////////////////////////////////////////////////////////////////////////////// CHANGE FRAME & PROFILE TITLE


var frameFirst = new Array(
'',
'',
'Economy Series',
'Classic Series',
'Oak Series',
'Architect Series',
'Homestyle Series',
'Corporate Series',
'Clean Cut Series',
'Rustic II Series');

var frameSecond = new Array(
'Economy Series',
'Classic Series',
'Oak Series',
'Architect Series',
'Homestyle Series',
'Corporate Series',
'Clean Cut Series',
'Rustic II Series');

function changeFrameTitle(elemid){

if(document.drop_list.Frame.value == 'NaN')
{
var ind = document.getElementById(elemid).selectedIndex;
document.getElementById("frameTitle").innerHTML=frameFirst[ind];
document.getElementById("profileTitle").innerHTML=frameFirst[ind];
}

else
{
var ind = document.getElementById(elemid).selectedIndex;
document.getElementById("frameTitle").innerHTML=frameSecond[ind];
document.getElementById("profileTitle").innerHTML=frameSecond[ind];
}
}


//////////////////////////////////////////////////////////////////////////////////////////// FRAME

function Frame(){


if(document.drop_list.Frame.value == 'NaN')
{
addOption(document.drop_list.Color, "", "----------------");
addOption(document.drop_list.Color,"", "Please Select a Frame Style First");
}

if(document.drop_list.Frame.value == 'economy')
{
if(document.drop_list.Frame.options.length == '10')
{
removeSelect(document.drop_list.Frame);
}
removeAllOptions(document.drop_list.Color);
addOption(document.drop_list.Color, "NaN", "Select Frame Color:");
addOption(document.drop_list.Color, "NaN", "----------------");
addOption(document.drop_list.Color,"honey", "Honey");
addOption(document.drop_list.Color,"da

Comments

Srini Chavali-Oracle

XE is not patch-able - there is no support available.

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 6 2008
Added on Apr 8 2008
5 comments
204 views