Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

179
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda