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

350
Views
javascript console return Uncaught SyntaxError: Unexpected token 'return'

I'm trying to show alert message before an action happens in js here is my code :

 content+='<a href='+delete_url+' onclick="return confirm('Are you sure you want to delete this item?');\"><button class="w-11/12 text-xs text-center text-white mx-auto bg-purple-900 py-1 px-2 rounded-xl"><i class="far fa-images"></i></button></a>';

but it shows nothing , when i change to '""' it raise this error:

Uncaught SyntaxError: Unexpected token 'return'

thank you in advance ..

about 4 years ago · Juan Pablo Isaza
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!