How to cancel image loading?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sophy

    How to cancel image loading?

    Hi folks,

    Now, I am facing problem with canceling image loading.
    I have tried:

    var img = new Image();
    img.src = "path/to/the/image";

    // and then I set the img.src to another source

    img.src = "somewhere/else";

    In this case the browse still loading the image from the first source
    ("path/to/the/image")

    Do you guys know how to stop image from loading?

    Cheers,
  • Evertjan.

    #2
    Re: How to cancel image loading?

    Sophy wrote on 18 jul 2008 in comp.lang.javas cript:
    Now, I am facing problem with canceling image loading.
    I have tried:
    >
    var img = new Image();
    img.src = "path/to/the/image";
    >
    // and then I set the img.src to another source
    >
    img.src = "somewhere/else";
    >
    In this case the browse still loading the image from the first source
    ("path/to/the/image")
    >
    Do you guys know how to stop image from loading?
    Not with clientside javascript.

    You could force the browser to close by external means,
    like pulling the plug??


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • Sophy

      #3
      Re: How to cancel image loading?

      On Jul 18, 3:04 pm, "Evertjan." <exjxw.hannivo. ..@interxnl.net wrote:
      Sophy wrote on 18 jul 2008 in comp.lang.javas cript:
      >
      Now, I am facing problem with canceling image loading.
      I have tried:
      >
      var img = new Image();
      img.src = "path/to/the/image";
      >
      // and then I set the img.src to another source
      >
      img.src = "somewhere/else";
      >
      In this case the browse still loading the image from the first source
      ("path/to/the/image")
      >
      Do you guys know how to stop image from loading?
      >
      Not with clientside javascript.
      >
      You could force the browser to close by external means,
      like pulling the plug??
      >
      --
      Evertjan.
      The Netherlands.
      (Please change the x'es to dots in my emailaddress)
      Can you tell me more about this(pulling and plug)?

      Comment

      • Evertjan.

        #4
        Re: How to cancel image loading?

        Sophy wrote on 18 jul 2008 in comp.lang.javas cript:
        On Jul 18, 3:04 pm, "Evertjan." wrote:
        [still morning overhere
        >You could force the browser to close by external means,
        >like pulling the plug??
        [please do not quote signatures on usenet,
        and only quote relevant parts]
        Can you tell me more about this(pulling and plug)?
        Yes, look at the back of your computer,
        There are many wires, one of them thicker than the others,
        usually but not neccessarily black.
        That one usually has a connector on both ends.
        Disconnect one of those connectors.

        Seems a bit off topic too, Sophy.

        --
        Evertjan.
        The Netherlands.
        (Please change the x'es to dots in my emailaddress)

        Comment

        • Laser Lips

          #5
          Re: How to cancel image loading?

          Do you guys know how to stop image from loading?>

          Don't specify a URL?
          Seriously, your going to have to explain a bit more how and why your
          doing this.

          Comment

          Working...