Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

101
Vistas
Select change event issue

My issue is that the change event will trigger whenever there is a change made in select element which also includes the page load when select element is populated with items and I don't want this.

I only want the change event (or some more proper event) to trigger ONLY when a selection is changed by the user via the mouse or keyboard.

In WPF this is resolved by having change and selectionchange events which correspond to the second scenario that I want.

<select id="filter_notification_byproductname" name="filter_notification_byproductname" asp-for="@Model.FilterByProductName" class="notification_list_list_filter_controll_input" asp-items="@Model.ProductDictionaryOfSelectListItemsForFiltering.Keys" multiple></select>
@section Scripts {
  <script type="text/javascript">
      $("#filter_notification_byproductname").bind("change", {
        productChanged: true
      }, SendIndexes);

      function SendIndexes(productChanged) {
        // SEND DATA TO THE SERVER
      }
    }
  </script>
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda