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

87
Vistas
How to identify from where it got trigger

I have two trigger point one is edit icon and other is add save button . on click on edit iocn and save button one model get open . model is same for both .

I want to make back focus on click on (x) icon of model from where it got trigger . how should i identify from where it got trigger from edit iocn or from add save button . and how to back focus on them ?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

One way you could do this by passing a value into your function. Let me make it clear by following example.

So there are two buttons

<button onclick="myFunction('edit')">Edit</button>
<button onclick="myFunction('save')">Save</button>

and Javascript function will look something like this

<script>
    function myFunction(event_type){
        if(event_type == 'edit'){
            //your further code for edit event goes here
        }
        else{
            //if event_type is not edit, then it's obviously save event
            //so your further code for save event goes here 
        }
    }
</script>
about 4 years ago · Juan Pablo Isaza Denunciar
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