Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8693819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:37:51+00:00 2026-06-13T00:37:51+00:00

I am getting a TypeError on the variable pattern and my script does not

  • 0

I am getting a TypeError on the variable “pattern” and my script does not execute past the marked break point. I am using the JCanvas and JQuery and all dependencies are in place. What is the reason for the error. There is a similar implementation used here.

function drawMe(thumbUrl){
  function drawThumb(){
    $("canvas").drawRect({
      //Code breaks here.
      fillStyle: pattern,
      x: 200, y: 100,
      width: 250, height: 100,
      fromCenter: false         
    });
  }

  var pattern = $("canvas").createPattern({
    source: thumbUrl,
    repeat: "repeat",
    load: drawThumb
  })

}

drawMe("http://placehold.it/100x100");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:37:52+00:00Added an answer on June 13, 2026 at 12:37 am

    i think you need to change this

    function drawThumb(){
        $("canvas").drawRect({
          //Code breaks here.
          fillStyle: pattern,
          x: 200, y: 100,
          width: 250, height: 100,
          fromCenter: false         
        });
      }
    

    to this

    function drawThumb(pattern){
        $("canvas").drawRect({
          //Code breaks here.
          fillStyle: pattern,
          x: 200, y: 100,
          width: 250, height: 100,
          fromCenter: false         
        });
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the following error, while using ExtJs MVC, Uncaught TypeError: Cannot call method
Im having a problem using an isNumeric jQuery function to check if a variable
I'm getting TypeError: coercing to Unicode: need string or buffer, int found This is
I am creating a Word class and I am getting an error: TypeError: superclass
I'm getting the error: Uncaught TypeError: Cannot read property 'constructor' of undefined When declaring
I'm getting this error: uncaught TypeError: Object [object Object] has no method 'on' at
I'm getting an an error TypeError: Cannot read property 'style' of undefined I'd be
I am getting the following error when running my code: Typeerror: lambda() takes exactly
I have the following code however am getting the error Uncaught TypeError: Object #<addThis>
I'm trying to use defmacro in ClojureScript, but I'm getting a console error: TypeError:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.