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

102
Views
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
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!