36874-vm/assets/js/main.js
Flatlogic Bot 1d182fef38 1.1
2025-12-11 19:19:52 +00:00

14 lines
544 B
JavaScript

document.addEventListener('DOMContentLoaded', function() {
const searchForm = document.getElementById('locationSearchForm');
if (searchForm) {
searchForm.addEventListener('submit', function(event) {
event.preventDefault();
const locationInput = document.getElementById('locationInput');
const location = locationInput.value.trim();
if (location) {
window.location.href = `listings.php?location=${encodeURIComponent(location)}`;
}
});
}
});