troubleshooting Question

How to script Canvas?

Avatar of ladesigner2014
ladesigner2014 asked on
Scripting LanguagesResponsive WebWeb Applications
1 Comment1 Solution379 ViewsLast Modified:
scripting help needed for this specific URL:

Simply, I am trying to script a clearCanvas drawing feature via a clearRect function. Can anyone let me know how to do this?

What I think are the snippets needed to script this are as follows, but I do not know how the JavaScript area gets resolved within the web page in order to clear Canvas1:

<a href="#canvas1">clearCanvas</a>

function clearCanvas() {            
            context.clearRect(0, 0, canvas.width, canvas.height);

Any scripting solution that properly "runs" on the JSFIDDLE site - and clears the drawing on the Canvas area - would be greatly appreciated. Thank you!
Robert Schutt
Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros