diff --git a/WebContent/html/webpages/shoppingCart.jsp b/WebContent/html/webpages/shoppingCart.jsp index 2862eb5..e402d2d 100644 --- a/WebContent/html/webpages/shoppingCart.jsp +++ b/WebContent/html/webpages/shoppingCart.jsp @@ -64,11 +64,11 @@ pageEncoding="ISO-8859-1"%> -
+

-
+

@@ -82,27 +82,27 @@ pageEncoding="ISO-8859-1"%>
- +
- +
- +
- +
-
- +
+
@@ -137,10 +137,11 @@ document.getElementById('ds').addEventListener('click',deleteSelected); document.getElementById('oa').addEventListener('click',orderAll_showPopup); document.getElementById('da').addEventListener('click',deleteAll); -document.orderForm.address.addEventListener('onkeyup',forceDropdownCustomLocation); -document.orderForm.city.addEventListener('onkeyup',forceDropdownCustomLocation); -document.orderForm.state.addEventListener('onkeyup',forceDropdownCustomLocation); -document.orderForm.zip.addEventListener('onkeyup',forceDropdownCustomLocation); +// Event listeners for order form address fields, to force select New Location if a field is changed +document.orderForm.address.addEventListener('keyup',forceDropdownCustomLocation); +document.orderForm.city.addEventListener('keyup',forceDropdownCustomLocation); +document.orderForm.state.addEventListener('keyup',forceDropdownCustomLocation); +document.orderForm.zip.addEventListener('keyup',forceDropdownCustomLocation); document.onkeydown = function(e) { if (e.keyCode == 27) { @@ -291,7 +292,7 @@ function autoFillFields(orderAllBool) { document.orderForm.name.value=employee.name; document.orderForm.phone.value=employee.phone; // already got locations on page load, now populate dropdown and mark appropriate option selected - document.orderForm.location_dropdown.innerHTML=""; + document.orderForm.location_dropdown.innerHTML=""; for (var i = locations.length - 1; i >= 0; i--) { document.orderForm.location_dropdown.innerHTML+= ("