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 6627249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:59:27+00:00 2026-05-25T21:59:27+00:00

i remove the link for copyright reason !.. sorry ! When you are in

  • 0

i remove the link for copyright reason !.. sorry !

When you are in Firefox, the images at the left (all the mockup) is loaded, after a few refresh, in chrome and safari, it NEVER show

I think it’s a image not loaded in memory problem, but i cant know when image are all loaded, i event put the script at the end, but no luck

So the question, what should do to make sur the images are loaded.. of is there and error in the JavaScript code ?

n.b.
i have tough about encoding the images as base64 for canvas display… is it possible or intelligent to do that ?

  • 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-05-25T21:59:27+00:00Added an answer on May 25, 2026 at 9:59 pm

    Actually, you can determine when all the images have finished loading. In order to do this, you just need to specify a callback function for the onload property of the image object. So, you would end up with something like this (in addition to the code you already have in canvas.js):

    var loaded_images = 0;
    var image_objects = [];
    
    // This is called once all the images have finished loading.
    function drawOnCanvas() {
        for (var i = 0; i < image_objects.length; ++i) {
            ctx.drawImage(image_objects[i], 0, 0); 
        }
    }
    
    function handleLoadedImage() {
        ++loaded_images;
    
        // Check to see if all the images have loaded.
        if (loaded_images == 7) {
            drawOnCanvas();
        }
    }
    
    document.ready = function() {
        for (var i=0;i<myimages.length;i++) {
            var tempimage = new Image();
            tempimage.src= myimages[i];
            tempimage.onload = handleLoadedImage;
            image_objects[i] = tempimage;
        }
    }
    

    The key concept is that you are keeping track of the number of images that have finished loading. Once all of the images are done loading, you know you can draw on the canvas.

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

Sidebar

Related Questions

File: /home/USER/DIR/a http://www.here.is.a.hyper.link.net/ /home/USER/DIR/b http://www.here.is.another.hyper.link.net/ Need to remove all the odd lines in this
I'm making a simple remove link with an onClick event that brings up a
All, I've got some links that get displayed and someone can click the link
On my wordpress blog my images link to another page and I would like
What's wrong with this code ? Only first add and remove link is working...
So I'm trying to get a remove link next to the caption in an
I have a remove link that will remove the current comment on my page.
Here an example http://jsfiddle.net/LW5pw/ <a href=# onclick=removeShipping('#shipping-block-id'); return false;>Remove</a> Remove link is not working
alt text http://sites.google.com/site/yanchengcheok/Home/help-remove-dot-line.png?attredirects=0 Whenever a click event happen on a hyper-link, I will use
Removed link, problem solved The menu at the top is supposed to be 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.