By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,818 Members | 2,121 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,818 IT Pros & Developers. It's quick & easy.

How to cancel image loading?

P: n/a
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,
Jul 18 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Sophy wrote on 18 jul 2008 in comp.lang.javascript:
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)
Jul 18 '08 #2

P: n/a
On Jul 18, 3:04*pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
Sophy wrote on 18 jul 2008 in comp.lang.javascript:
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)?
Jul 18 '08 #3

P: n/a
Sophy wrote on 18 jul 2008 in comp.lang.javascript:
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)
Jul 18 '08 #4

P: n/a
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.

Jul 18 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.