User Profile

Collapse

Profile Sidebar

Collapse
NetWorker
NetWorker
Last Activity: Aug 27 '10, 04:46 PM
Joined: Aug 20 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • NetWorker
    replied to Loading images in the background
    Images are protected by 401 Error - user can't access them manipulating JS.

    My site is dynamicly changing, sets of images are changing during visit. My script is too complicated to be always right. Sometimes there can be a bug - requesting wrong image.

    Is there any way to ignore these images and go to next?

    (Be sure that I made all my best to solve this problem by another solution - this is my last chance)
    See more | Go to post

    Leave a comment:


  • NetWorker
    replied to Loading images in the background
    Thank you so much for answer

    1) Never mind. I changed some things and it works perfectly.

    2) I can't do it server-side - that's the point. However, server does know which images are available for current user. If he request wrong image he gets 401 error. Privileges are given dynamicly, are diffrent according to user status, actual time etc. It must be JS.
    See more | Go to post

    Leave a comment:


  • NetWorker
    started a topic Loading images in the background

    Loading images in the background

    Hello everyone ;)

    I would like to load some images using JS.

    My code:
    Code:
    var img=new Image();
    img.onload = function() {f1()};
    img.onerror = function() {f2()};
    img.src='http://example.com/image.gif';
    sett = setTimeout(function() {f3()}, 100000);
    
    //f3 contains not interesting code and:
    img = null;
    clearTimeout(sett);
    Simply task,...
    See more | Go to post
    Last edited by NetWorker; Aug 20 '10, 08:31 PM. Reason: Missing a letter
No activity results to display
Show More
Working...