uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
two options with image javascript

Knowledge Base Lobby : uShop Support Conference : Programmer Tips
Oct-22-17 09:41 AM EST
Original Message
two options with image javascript
Author Lori on 10-29-2002 at 17:44 (EST)
Hello,
I read the posting about using javascript with an image to have size options. Everything works fine as long as I keep one product only on the page. As soon as I include a second product on the same page I get "document.INTERCONNECT has no properties" please help...here is my code:

function addDIGITAL()
{
var price = "$600.00";
var itemQuantity = document.DIGITAL.quantity.value;
var digitalLength = document.DIGITAL.digitalLength.options[document.DIGITAL.digitalLength.selectedIndex].value;


if (digitalLength == "3.0M")
{
price = "$700.00";
}
else if (digitalLength == "6.0M")
{
price = "$900.00";
}
else if (digitalLength == "10.0M")
{
price = "$1,100.00";
}
else
{
price = "$600.00";
}

document.uShopJSI.addProduct(
"DIGITALCABLE",
"The Goldmund Lineal Digital Cable",
digitalLength,
"0",
itemQuantity,
price,
"$0.00",
"$0.00",
"$0.00",
"YES");

}



function addINTERCONNECT()
{

var price = "0.00";
var itemQuantity = document.INTERCONNECT.quantity.value;
var interLength = document.INTERCONNECT.interLength.options[document.INTERCONNECT.interLength.selectedIndex].value;


if (interLength == "2.0M")
{
price = "$1,200.00";
}
else if (interLength == "3.0M")
{
price = "$1,200.00";
}
else if (interLength == "4.0M")
{
price = "$1,200.00";
}
else if (interLength == "8.0M")
{
price = "$1,500.00";
}
else
{
price = "$1,100.00";
}

document.uShopJSI.addProduct(
"INTERCONNECTCABLE",
"The Goldmund Lineal Interconnect",
interLength,
"0",
itemQuantity,
price,
"$0.00",
"$0.00",
"$0.00",
"YES");
}
heres my (nonHTML) forms:

FORM NAME="DIGITAL"
SELECT NAME="digitalLength"
OPTION VALUE="1.5M"1.5MOPTION
OPTION VALUE="3.0M"3.0MOPTION
OPTION VALUE="6.0M"6.0MOPTION
OPTION VALUE="10.0M"10.0MOPTION
SELECT
onClick="addDIGITAL();return false

FORM NAME="INTERCONNECT"
SELECT NAME="InterLength"
OPTION VALUE="1.0M"1.0MOPTION....yada' yada' yada'
onClick="addINTERCONNECT();return false;



thanks ahead for the help
Lori
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  two options with image javascript Microburst Support Team, 2002-10-30 08:51:00 (1)
            help Lori, 2002-10-30 11:29:07 (2)
                 two images javascript Microburst Support Team, 2002-10-30 14:36:00 (3)

Messages In This Discussion
         1. two options with image javascript
        Author Microburst Support Team on 10-30-2002 at 08:51 (EST)
It looks like your second select which you have shown as

SELECT NAME="InterLength"

should be

SELECT NAME="interLength"

...I am pretty sure these are case sensitive. Try making this change and let us know if that doesn't fix the problem.

One other thing - the forum doesn't properly display ending html brackets - make sure your second select statement has an end-select html tag before the "onClick" line.
TABLE OF CONTENTS
                 2. help
                Author Lori on 10-30-2002 at 11:29 (EST)
nope..still not working????

please help
TABLE OF CONTENTS
                         3. two images javascript
                        Author Microburst Support Team on 10-30-2002 at 14:36 (EST)
Please attach your html code to an e-mail and send it to support@uburst.com so that we can look at the entire source.
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.