Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

85
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!