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

205
Views
SyntaxError missing ) after argument list in JAvascript

i tried to concatenate the values to add more variables to a onClick functio. But it get the error: missing ) after argument list. So this code is for a game and it's not possible to reproduce it. I tried everything but i can't get it to work.

var elem = `
    <div class="col-sm-3">
        <div class="card text-dark bg-light mb-3" style="max-width: 18rem;">
          <h5 class="card-header">` + getAvailableVehicles.plate + `</h5>
          <div class="card-body">
            <h5 class="card-title">` + getAvailableVehicles.name + `</h5>
            <p class="card-text"><b>Tank: </b>` + getAvailableVehicles.fuel + ` L</p>
            <p class="card-text"><b>Motorzustand: </b>` + getAvailableVehicles.engine + ` %</p>
            <p class="card-text"><b>Karosseriezustand: </b>` + getAvailableVehicles.body + ` %</p> <br>` +
             (getAvailableVehicles.status == 0 ? `<a onclick='takeOutGarage(` + getAvailableVehicles.plate + `,` + spawnPointX + `,` + spawnPointY + `,` + spawnPointZ + `,` + spawnPointW + `)' class='btn btn-primary'>AUSPARKEN</a>` : '') +
             (getAvailableVehicles.status == 1 ? `<a href="#" class="btn btn-primary">AUSGEPARKT</a>` : '') +
             (getAvailableVehicles.status == 2 ? `<a href="#" class="btn btn-primary">ABGESCHLEPPT</a>` : '') +
             (getAvailableVehicles.status == 3 ? `<a href="#" class="btn btn-primary">BESCHLAGNAHMT</a>` : '') +
          `</div>
        </div>
      </div>`;
    $("#first-row").append(elem);

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!