www.uburst.com www.uburst.com

"two options with image javascript"

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

Programmer Tips
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"two options with image javascript"
Posted by Lori on Oct-29-02 at 05:44 PM (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

Click to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

two options with image javascript, Microburst Support Team, Oct-30-02, (1)
help, Lori, Oct-30-02, (2)
two images javascript, Microburst Support Team, Oct-30-02, (3)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "two options with image javascript"
Posted by Microburst Support Team on Oct-30-02 at 08:51 AM (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.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . "help"
Posted by Lori on Oct-30-02 at 11:29 AM (EST)
nope..still not working????

please help

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
3 . "two images javascript"
Posted by Microburst Support Team on Oct-30-02 at 02:36 PM (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.
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.