hi in this page www.milanhouses.com/general-clean how can i make icon lens clickable and sent to page Immobili | MilanHouses ?
It seems you’ve figured out how to make it linked to the page. I’m guessing your next step is to figure out how to preserve the search when moving between the pages?
yes i made this code but it doesn t work when i click on the icon as it can t be sent on the other page
<!DOCTYPE html>
<html>
<head>
<style>
body { margin: 0; padding: 0; font-family: 'Helvetica', sans-serif; display: flex; justify-content: center; background: transparent; }
.search-container { display: flex; width: 100%; max-width: 600px; border: 1px solid #d1d1d1; box-shadow: 0 2px 5px rgba(0,0,0,0.1); background-color: #fff; overflow: hidden; }
.input-box { flex-grow: 1; padding: 10px 15px; display: flex; flex-direction: column; }
.label { font-size: 10px; text-transform: uppercase; color: #999; font-weight: bold; margin-bottom: 2px; }
select { border: none; font-size: 18px; color: #333; outline: none; background: transparent; cursor: pointer; width: 100%; appearance: none; }
.search-button { background-color: #1a1f71; width: 60px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; }
.search-button svg { width: 20px; height: 20px; fill: white; }
</style>
</head>
<body>
<div class="search-container">
<div class="input-box">
<span class="label">Affitto</span>
<select id="zonaSelect" onchange="sendValue()">
<option value="">Dove vuoi vivere a Milano?</option>
<option value="Centro Storico">Centro storico</option>
<option value="Stazione Centrale">Stazione Centrale</option>
<option value="Porta Venezia">Porta Venezia</option>
<option value="Porta Romana">Porta Romana</option>
<option value="Vigentino">Vigentino</option>
<option value="Lorenteggio">Lorenteggio</option>
<option value="San Siro">San Siro</option>
<option value="Fiera">Fiera</option>
<option value="Isola">Isola</option>
</select>
</div>
<button class="search-button" onclick="sendValue()">
<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
</button>
</div>
<script>
function sendValue() {
const select = document.getElementById('zonaSelect');
const val = select.value;
// Invia il valore al codice Velo della pagina
window.parent.postMessage(val, "*");
}
</script>
</body>
</html>