Accessing country dropdown value in cart via JavaScript

General ShopSite user discussion
Post Reply
beley
Posts: 111
Joined: Sun Aug 06, 2006 10:05 am
Location: LaGrange, GA
Contact:

Accessing country dropdown value in cart via JavaScript

Post by beley »

I want to display a message to people ordering from Canada right when they use the shipping calculator. I tried to do this using Jquery but something is wrong with the ShopSite generated form -- I think it doesn't like that it simply says "selected" and not "selected='selected'". It also doesn't have an ID which would be nice.

I've tried looking for a javascript variable (ss_country) to find out what the country is when the shopping cart page reloads after calculating shipping, but it seems the ship to country is only available on the thank you page? ???

Any help would be greatly appreciated...
Brandon Eley
[i]Certified ShopSite Designer[/i]
loren_d_c
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere
Contact:

Re: Accessing country dropdown value in cart via JavaScript

Post by loren_d_c »

I don't know about jquery, but here is an example of straight JavaScript that may do what you are looking for:

http://support.lexiconn.com/news/viewtopic.php?t=289

-Loren
beley
Posts: 111
Joined: Sun Aug 06, 2006 10:05 am
Location: LaGrange, GA
Contact:

Re: Accessing country dropdown value in cart via JavaScript

Post by beley »

That worked great, thanks Loren!
Brandon Eley
[i]Certified ShopSite Designer[/i]
Post Reply