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

199
Views
Onclick save drawing for Javascript in <script> element
 function save() {
    document.getElementById("canvasimg").style.border = "2px solid";
    var dataURL = canvas.toDataURL();
    document.getElementById("canvasimg").src = dataURL;
    document.getElementById("canvasimg").style.display = "inline";
}

wich will creat a new picture to the right but i want it to download right away i think you would have to use

<a href="x" download>

but what would x be for the download and how would i set it to download on click

The Comment

Does this answer your question? Download data URL file – Harshit Rastogi

i tried to use that code but it says it has an error trying to download im using github so i think it tried to download the site i made. The error in the bottom right

here is the website ive been trying for it to work its a little messy but in the middle is the drawing https://bobzilla07.github.io/web-platform-j1pnv3/

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!