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

150
Views
confirm change SELECT with PHP and JS

I have 2 files, 1 for the PHP(html) and 1 for the JS code. I want to confirm any change on my SELECT...

PHP:

<select id="transfer_option" onchange="transfer_select()">
foreach (get_users() as $user){
       <option>$user['email']</option>
}
</select>

and on my JS file :

transfer_select() {
      if(confirm('Are you sure ?')){
            *ajax code, not important*
      }
}

But when I change the option and cancel, the option change anyway...

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use another jquery library like a sweet alert for confirmation

https://sweetalert2.github.io/ 
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!