Commit a0c9d4cd authored by Clara Stoddart's avatar Clara Stoddart

Fixed URL string query bug

parent 8dbf95af
......@@ -15,6 +15,7 @@ var dietNumSet = false;
// }
function checkAllergen(product) {
console.log(product);
var promise = new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest();
var result;
......@@ -25,7 +26,7 @@ function checkAllergen(product) {
}
};
xhr.onerror = () => reject(xhr.status);
xhr.open("GET", "http://localhost/script.php?product="+product+"&dietNum="+dietNum, true);
xhr.open("GET", "http://localhost/script.php?product="+(encodeURIComponent(product))+"&dietNum="+dietNum, true);
xhr.send();
});
return promise;
......
......@@ -15,7 +15,7 @@ import java.util.*;
*/
public class CSVReading {
private static String csvFile = "C:\\Clickerance\\chrome-groceries-extension\\webscraping\\25-June-2020-data.csv";
private static String csvFile = "C:\\Clickerance\\chrome-groceries-extension\\webscraping\\6-October-2020-data.csv";
private static final String TABLE_NAME = "ProductsIngredients";
enum Ingredient {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment