Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function saveChanges() {
  2.  
  3.     let destinationValues = document.getElementById("destination");
  4.     let continentValues = document.getElementById("continent");
  5.     let priceValues =  document.getElementById("price");
  6.     let dateValues = document.getElementById("date");
  7.  
  8.     if (destinationValues.value === "" || continentValues.value === "" || priceValues.value === "" || dateValues.value === "") {
  9.         return
  10.     }
  11.  
  12.     let formData = {
  13.         "destinationValues": destinationValues.value,
  14.         "continentValues":continentValues.value,
  15.         "priceValues": priceValues.value,
  16.         "dateValues": dateValues.value
  17.     };
  18.  
  19.     comonData.push(formData);
  20.     render(comonData);
  21.  
  22.     destinationValues.value = "";
  23.     continentValues.value = "";
  24.     priceValues.value = "";
  25.     dateValues.value = "";
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement