Hi
I am using the following code to create an image viewer for multiple
images.
var pageImage = document.images['mainImage'];
var image = new Image();
var args = GetQuerystring( ); //return arguments from querystring
image.src = args.imageSourc e; //get image src
pageImage.src = "";
pageImage.src = image.src;
IE one image after another using one page as the viewer. The view
loads the image into an Image object and then displays it on the page
after doing some resizing etc
However I am getting erroneous results from time to time. Most of the
images will load in the viewer, then I will get one that doesn't load,
it doesn't even show a placeholder, it will load if refresh is hit or
if the viewer is moved on to another image and then moved back.
I have also tried setting the src of the image to "" and then setting
the src to the new image with no luck. I could of course load all the
images into the cache, but with potentially hundreds of images, this
is impractical.
Any help would be very gratefully received
Cheers
Charlie 1 3105
First of all I would never use 'image' as variable name, rather
'anImage' although it seems that it is not a reserved word.
I have had luck with using the setTimeout method when changing image
source. Try this:
var anImage = new Image();
......
setTimeout(anIm age.src = args.imageSourc e;',5);
......
If that does not work, make sure your GetQueryString method works ok,
put an alert after it, so:
......
var args = GetQuerystring( );
alert(args);
...... su**@acheson-crow.com (Charlie) wrote in message news:<57******* *************** ****@posting.go ogle.com>... Hi I am using the following code to create an image viewer for multiple images.
var pageImage = document.images['mainImage']; var image = new Image(); var args = GetQuerystring( ); //return arguments from querystring image.src = args.imageSourc e; //get image src pageImage.src = ""; pageImage.src = image.src;
IE one image after another using one page as the viewer. The view loads the image into an Image object and then displays it on the page after doing some resizing etc
However I am getting erroneous results from time to time. Most of the images will load in the viewer, then I will get one that doesn't load, it doesn't even show a placeholder, it will load if refresh is hit or if the viewer is moved on to another image and then moved back.
I have also tried setting the src of the image to "" and then setting the src to the new image with no luck. I could of course load all the images into the cache, but with potentially hundreds of images, this is impractical.
Any help would be very gratefully received
Cheers
Charlie This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Barry Pearson |
last post by:
I'm not asking a question. I'm simply showing a technique that may be useful
to some people in future.
I wanted a way of using photographs for rollover effects without having to
slice the photographs into individual images for the individual links. I
wanted a pure CSS (no script) method. Here is my answer, using just 2
photographs, one for the "pale" foreground image, and one for the "rich"
(saturated) rollover image.
...
|
by: Mythran |
last post by:
On all test machines, some images load, others don't (all in IE 5.5 and above).
So, how can I force all images on an html/aspnet page to load?
What I mean by they do not load, I have to right-click on the image location and
select "Show Image" from the context menu. Mozilla/Opera load the images fine,
it seems to be an IE thing....
Thanks,
Mythran
|
by: Carl Gilbert |
last post by:
Hi
I am developing a site that has 5 or 6 thumbnail pages each with 28 image on
each. Each thumb nail has a matching larger image.
So 5/6 groups of 28.
When the user clicks on one of the images, I want to load up another page
showing the selected full size image. I then want to provide the ability to
move back and forward through the collection of images.
|
by: Solitus |
last post by:
Lets say i have 2 images, a.jpg and b.jpg
Both are actually one same picture of a bear but have different filenames.
is there anyway in .net that i can find out if the two pictures are actually
same even if the filename is different.
|
by: Alan |
last post by:
Hi,
I'm converting a database application from Access 97 to C#/SQL Server. Old
database contains some images in OLE fields. I've figured out that there's
OLE header preceeding actual image data and dealt with some of the images
which were in standard BMP format but most of the images are in some other
format which is displayed ok in access application and can be copy/pasted to
any image editor but when doubleclicking it doesn't open any...
| |
by: pedrito |
last post by:
I've got an app that downloads images off the internet using anywhere from
1-20 threads concurrently (though generally around 4 threads).
I have a preview page that shows the images as they're downloading. The
threads that do the downloading trigger an event every 32K (the size of the
chunks I receive), at which point the images are drawn in the Preview page.
To create the images, I create a memory stream from the data and then use...
|
by: elamberdor |
last post by:
Hi All!
Well, i'm modifying a dynamic map, with lat and long datapoints, my problem is it loads in text perfectly onto exact points I specify on the map,
..well now I want to load in icons(images) instead of text. (yes i'm being difficult)
and i'd like the text to load into a static placeholder symbol instead.
Problem is, I can get images to load in a separate file, text to load in a separate file, and text to appear in a static...
|
by: Keith Hughitt |
last post by:
Hi all,
I am having trouble preloading images in a javascript application, and
was wondering if anyone had any suggestions.
Basically I have a bunch of images stored in a database as BLOBs. At
any given point in time a subset of those images is displayed on-
screen. At certains times I want to swap out those on screen with new
ones from the database, and do some as seamlessly as possible.
So what I've tried to do is first create Image...
|
by: matheussousuke |
last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails.
The goal is: Make it send the email with the URL http://mghospedagem.com/images/controlpanel.jpg
instead of
http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg
As u see, there's the website URL before the image URL.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |