I need to setup a simple Javascript to check whether or not a shipping option in a dropdown menu is selected. Or perhaps more easy, whether or not "United States" is selected as the destination country.
If yes, nothing else will happen. If no, then I need an checkbox to appear that features an agreement for our international shipping.
TLDR;
If US selected as country then no international agreement checkbox
else
International agreement checkbox
I know the webpage tracks country via this...
v2selnames = new Array("ShipCountry","ShipState_dropdown");
ShipCountry_default_value = "United States";
ShipState_dropdown_default_value = "";
var ShipState_dropdown = new Array();
And I know it's pulling this for the checkbox
<input type="checkbox" name="Orders.Custom_Field_DutiesCost" value="Y">
How can I go about accomplishing this?
Thank you for your time.
Aucun commentaire:
Enregistrer un commentaire