Reorganizacja struktury plików frontendu

This commit is contained in:
Damian Michalski 2020-01-18 18:14:45 +01:00
parent 73c980f8e4
commit 50622588a2
38 changed files with 7 additions and 20 deletions

View File

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 201 KiB

View File

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 576 KiB

After

Width:  |  Height:  |  Size: 576 KiB

View File

@ -14,31 +14,18 @@
let req = new XMLHttpRequest();
let url = "";
req.open("POST", url, true);
req.open("GET", url, true);
req.setRequestHeader("Content-Type", "application/json");
// Create a state change callback
//req.onreadystatechange = function () {
// if (req.readyState === 4 && req.status === 200) {
//
// Print received data from server
// result.innerHTML = this.responseText;
// }
// };
req.onreadystatechange = function () {
if (req.readyState === 4 && req.status === 200) {
var data = JSON.stringify({
fuel_type: fuel_type.value,
seats: seats.value,
doors: doors.value,
maximum_price: maximum_price.value,
max_years_old: max_years_old.value,
engine_power: engine_power.value,
car_type: car_type.value,
gearbox: gearbox.value,
drive_type: drive_type
});
Print received data from server
result.innerHTML = this.responseText;
}
};
req.send(data);
}