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

262
Views
ob_get_clean() elimina el valor de entrada

consola.log(ab_id_transakce); devuelve una variable vacía porque hay en php ob_get_clean(). Soy novato, así que no entiendo lo que está haciendo. Si elimino la línea con ob_get_clean() ab_id_transakce tiene la variable correcta de la entrada del formulario.

¿Cómo hacer que la función afiliar() funcione también con ob_get_clean()?

 <?php ob_start(); ?> <div class="form-wrapper"> <input type="email" name="email" id="email" placeholder="E-mail *" class="required"> <button type="submit" class="full-width secondary submit-form" onclick="affilate()"><span class="outer-no-height align-center"><span class="middle"><i class="ct-icon-envelope"></i></span><span class="middle">Send</span></span></button> </form></div> <script> function affilate() { var ab_instance = "xxxx"; var ab_kampan = 3; var ab_cena = 1; var ab_id_transakce = document.getElementById("email").value; console.log(ab_id_transakce); var script_tag = document.createElement("script"); script_tag.src = "https://xxxx.cz/t3.js"; script_tag.type = "text/javascript"; script_tag.async = true; script_tag.defer = true; document.head.appendChild(script_tag); } </script> </div> <?php $html_form = ob_get_clean(); ?> <div class="something">
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!