473,387 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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,
Jul 18 '08 #1
4 4072
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: OneSolution | last post by:
Hi All, Here's what I'm trying to do. I have a diverse customer base, and as it grows, it's increasingly harder to figure out what aspect of our web site is selling and what is not. So I've...
2
by: Mekon | last post by:
I have never written a line of script in my life but I need some help with it now. I have this auto generated code which I want to modify if possible The script generates a strip of...
2
by: Rob Manger | last post by:
Hi All, I am hoping someone can help me. I am trying to setup my main page so that when the user moves the mouse over an image, it changes the source (got this working). When the user CLICKS...
4
by: Sharon | last post by:
Hi Everyone, I have a TIF file 62992 x 113386 Pixels, Huffman RLE compression, 3200 x 3200 DPI resolution, binary colored (1 Bit Per Pixel), file on disk size 43.08 MB (45,169,042 Bytes). This...
4
by: Bruce | last post by:
I have an asp.net page that is dynamically building a table and populating cells with images (typically jpeg) and with associated metadata. How can the asp.net code efficiently determine the...
1
by: agatha.life | last post by:
I did a javascript for the loading of images (I didn't want to have the images loaded in "on loading" because they are too many). The website is for a model and if you look at the codeof pages (...
14
by: Steve K. | last post by:
I have a method that I use to get a System.Drawing.Image from a file without keeping a handle on the file open (so I can delete the file). Here is the code: <code> public static Image...
5
by: ghjk | last post by:
I have "cancel" button in php files. I want to write common javascript function for cancel button. When user click cancel button I want to clear php form data. Is it possible? <input id="Cancel"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.