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

  • SEARCH
  • Home
  • 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 8288659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:19:20+00:00 2026-06-08T12:19:20+00:00

I am working on a project using HTML5 and JavaScript. I am loading an

  • 0

I am working on a project using HTML5 and JavaScript. I am loading an image from the C: drive like this:

window.onload = function() {
    var canvas = document.getElementById("myCanvas");
    var context = canvas.getContext("2d");
    var imageObj = new Image();

    imageObj.onload = function() {
      context.drawImage(imageObj, 69, 50);
    };
    imageObj.src = "file:///C:/Images/Demo.jpg";
  };

The image is loading perfectly on this page. When try the same thing in my project, the image won’t load in a canvas element. I am getting the following error from the browser:

Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE)[nsIDOMCanvasRenderingContext2D.drawImage]

How can this problem be solved?

  • 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-08T12:19:21+00:00Added an answer on June 8, 2026 at 12:19 pm

    On Project its not advisable to use direct path you should use a related path as per your server directory
    as ‘<%=request.getContextPath()%>’/Remaing_path_from_webContent_folder_of_project

    Hope it will work

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using HTML5 and javascript in a project. I am loading image from
I'm using the HTML5 elements and in a project i'm working on and the
I am working on a project using Groovy, and I would like to take
Currently I am working on project like web analytic using rails 3.2.3 I have
I am working on one project and I am using JavaScript code to get
I have been working on a project that dynamically creates a javascript file using
I am working on a small project in google app engine. Using html5 canvas
I'm working on a simple JavaScript game using HTML5 canvas. It's a very typical
Working on a project using Entity Framework (4.3.1.0). I'm trying to figure out how
I'm working on a project using Scala running Selenium tests as part of a

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.