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

182
Views
Why is this Javascript code generated by PHP not working?

All PHP generated Javascript Code I’ve done works, but this doesn’t … any idea?

echo "<a href=\"javascript:linkTo_UnCryptMailto('$r');\">E-Mail an $row[firma] senden</a> &hellip;<br />\n";

I’ve tried everything … print <<<HTML, print <<<JS … other quotes (single quotes, no quotes) … it just executes an HTML link …

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

0

It's hard to be sure - what's the value of $r and $row? Which part isn't working? What is the actual output of the markup, when you view the source? Are there any javascript errors in the Web Developer console?

I will make an assumption that $r and $row are valid PHP variables in this context, and that the linkTo_UnCryptMailto() javascript function exists.

I also note that the firma key is not enclosed in quotes - I am going to assume that's a typo.

Try simplifying the code and not parsing the variables within a "double quoted" string:

echo '<a href="javascript:linkTo_UnCryptMailto(' . $r . ')">E-Mail an ' . $row['firma'] . ' senden</a> &hellip;<br />';
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!