Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

99
Vistas
Retrive image with URL paramter and javascript

Sadly, I have not enough experience in JS to do this.

I want to call the Google chart API with my URL paramter as data. Here I used Javascript to store the URL paramter 'voucher' in a variable from my Website:

mywebsite.com/core/voucher/?voucher=123

This is the code I use:

<script>
    const queryString = window.location.search;
    const urlParams = new URLSearchParams(queryString);
    const voucher= urlParams.get('voucher');
   //voucher = 123
</script>

<img id="qr" src="https://chart.apis.google.com/chart?cht=qr&chs=400x400&chl=1"/>

Now I need the 'voucher' variable to call the Google chart URL with my variable as the chl URL paramter. How can i archive this?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda