473,748 Members | 2,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image preload experiments (IE vs. Firefox) - Not a FAQ

cjl
OK:

I am really scratching my head over a preload / image swapping problem,
so I started conducting experiments:

http://www.saintrays.net/experiment1.html
http://www.saintrays.net/experiment2.html
http://www.saintrays.net/experiment3.html

View the source of each page to see the relevant javascript. All three
experiments work smoothly in both Firefox and IE for me.

The website I am developing uses the method in experiment3, that is at
run time a javascript file is dynamically added to the document which
contains some relevant variables, images are preloaded, and then
swapped. It can be seen at:

http://www.casespace.net/

It is designed to run at 1024 x 768 only, and the browser must be
'fullscreen'. This is accomplished with 'F11' in IE (plus enabling the
autohide feature after right clicking on the remaining title bar) and
with the 'Autohide' extension for Firefox. The instructions need work,
but are fairly straightforward .

The problem is that for casespace.net image swapping is not smooth in
IE, and it seems to recheck with the website each time I swap an image,
even though they are preloaded, greatly slowing down the ability to
quickly scroll through images. It works flawlessly in Firefox.

I can't find the difference between experiment3 (which works in IE
without the constant checking) and the method I use on casespace.

Any help would be appreciated. I am going nuts. Arrrgh.

-CJL

Nov 11 '05 #1
7 9107
cjl wrote:
OK:

I am really scratching my head over a preload / image swapping problem,
so I started conducting experiments:

http://www.saintrays.net/experiment1.html
http://www.saintrays.net/experiment2.html
http://www.saintrays.net/experiment3.html [...]
The problem is that for casespace.net image swapping is not smooth in
IE, and it seems to recheck with the website each time I swap an image,
even though they are preloaded, greatly slowing down the ability to
quickly scroll through images. It works flawlessly in Firefox.
Your casespace.net site did not work at all for me in either IE or Firefox.

I can't find the difference between experiment3 (which works in IE
without the constant checking) and the method I use on casespace.

Any help would be appreciated. I am going nuts. Arrrgh.


You script seemed overly complex to me - here's an alternative that
seems to work fine for me:
<script type="text/javascript">

var PicObj = {
loaded : 0,
showing : 0,
pics : [],
imgEl : null
};

function loader(numToLoa d){
PicObj.imgEl = document.getEle mentById('the_i mage');
for (var i=0; i<numToLoad; ++i) {
PicObj.pics[i] = new Image();
PicObj.pics[i].src = 'mr0_' + i + '.jpg';
}
PicObj.loaded = --i;
PicObj.pics[PicObj.loaded].onload = looper;
}

function looper() {
PicObj.imgEl.sr c = PicObj.pics[PicObj.showing].src;
PicObj.showing = ++PicObj.showin g % PicObj.loaded;
timeout_state = setTimeout("loo per()", 50);
}

window.onload = function(){load er(26);}

</script>
--
Rob
Nov 11 '05 #2
cjl

RobG wrote:
Your casespace.net site did not work at all for me in either IE or Firefox.
I am interested to know what didn't work, particularly in Firefox,
because it is working fine here. Did you read through the
instructions?
You script seemed overly complex to me...


I know. I'm doing some strange things at 'run time', and I'm not a
very good programmer.

Thanks for the example code, I will go back to the drawing board with
the image preloading and swapping code, and see if I can't find the
problem through trial and error.

-CJL

Nov 11 '05 #3
cjl wrote:
RobG wrote:
Your casespace.net site did not work at all for me in either IE or
Firefox.


I am interested to know what didn't work, particularly in Firefox,
because it is working fine here. Did you read through the
instructions?


The problem, which puzzled me at first as well, is that you do not say
explicitly one has to click through all the instructions pages before
there is usable content on the Web site. "If you need instructions"
does not read much as being compulsory, however it is :)

Otherwise, it works fine im my Firefox 1.0.7/Linux, even though I do not
understand why you would have to make the UI so difficult to use (almost
keyboard-only, where the "almost" being an issue by itself). And many
conditions you set, as you say, "consistent user experience" (where there
is a typo, BTW), like browser and display resolution, are not really
required. Never ever expect anyone to change a running system because
of your Web site.
HTH

PointedEars
Nov 11 '05 #4
cjl

Thomas 'PointedEars' Lahn wrote:
The problem, which puzzled me at first as well, is that you do not say
explicitly one has to click through all the instructions pages before
there is usable content on the Web site. "If you need instructions"
does not read much as being compulsory, however it is :)
Sorry.
Otherwise, it works fine im my Firefox 1.0.7/Linux,
Good. even though I do not
understand why you would have to make the UI so difficult to use (almost
keyboard-only, where the "almost" being an issue by itself). And many
conditions you set, as you say, "consistent user experience" (where there
is a typo, BTW), like browser and display resolution, are not really
required. Never ever expect anyone to change a running system because
of your Web site.


Thank you for the feedback. My users will be a very narrow subset of
people, namely radiology residents at my hospital, where I can ensure
they all have the proper setup. I know that the UI needs some work,
but what I didn't tell you is that the controls very closely mimic are
PACS system, so most residents are comfortable with controlling it.

The real problem is still the preloading / image swapping in IE, which
I am unable to solve at this point. Any thoughts on this? Have you
tried it in IE to see what I am talking about.

Thanks again,
CJL

Nov 11 '05 #5
cjl wrote:
Thank you for the feedback.
You're welcome.
My users will be a very narrow subset of people, namely radiology
residents at my hospital, where I can ensure they all have the proper
setup. I know that the UI needs some work, but what I didn't tell you
is that the controls very closely mimic are PACS system, so most
residents are comfortable with controlling it.
So it should not be a public Web site in the first place, should it?
The real problem is still the preloading / image swapping in IE, which
I am unable to solve at this point. Any thoughts on this?
Not yet.
Have you tried it in IE to see what I am talking about.


Sorry, I don't have IE here.
PointedEars
Nov 11 '05 #6
IE specifically has issues with caching images, see if this page:
http://www.netmechanic.com/news/vol6/javascript_no1.htm is relevant to
your situation.

Nov 11 '05 #7
cjl

ro***********@g mail.com wrote:
IE specifically has issues with caching images, see if this page:
http://www.netmechanic.com/news/vol6/javascript_no1.htm is relevant to
your situation.


Thank you for the information.

While the reference describes the problem I am having with IE, the
solution does not work for me, as I am already using relative paths.

I am going to continue my experiments...a rrrgh.

-CJL

Nov 11 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1921
by: Harod Ruthgar | last post by:
var image = new Image(); image.src="pathToTheFile"; The above code is called 25 times (with different pathToTheFile) within a loop. I manually checked the cache directory and not all images are cached, sometimes it's only 3, sometimes 4, etc, and mostly only the last few images within the loop.
1
2270
by: Peter Fastré | last post by:
Hello The javascript preload function I always used, is causing problems with the latest version of gecko-browsers. Never had any problems with it though. Maybe there's something wrong? http://pfastre.no-ip.com/arg/ http://pfastre.no-ip.com/lunatis/ http://pfastre.no-ip.com/gsm/ ....
4
1404
by: X l e c t r i c | last post by:
This isn't working and I can't figure out what I'm doing wrong: var c_imgs = new Array( 'images/champascari.jpg', 'images/champfangio.jpg', 'images/champhawthorn.jpg', 'images/champhill.jpg', 'images/champsurtees.jpg', 'images/champlauda.jpg', 'images/champschumacher.jpg');
3
26758
by: jon | last post by:
Hello, I've had long standing code that runs in IE, that I'm testing with firefox unsuccessfully now. The problem seems to be that images that I dynamically create don't fire their onload event in firefox. The onload method I assign is never being called. Any ideas why firefox isn't calling this, or what I can do for a workaround? Below is approxiatemate code of what I'm doing...
5
4189
by: Cate Archer | last post by:
I'm trying to position images using CSS. I put inline style code in the <imgtag. Why does this line of code work in IE7 but not in Firefox 2.0? Anybody got a better way? <img height="160" width="160" style="position=relative; top=20; left=20;" src="images/bomb.jpg">
2
2851
by: g1r2a3 | last post by:
Hello: The following script // ======================================= // do not edit anything below this line // ======================================= var t var j = 0
0
1337
by: AkbarAzizi | last post by:
Hi, Is there anybody who knows why my following java/Groovy code does not work in Firefox? The function ImageIO.createImageInputStream returns NULL in Firefox. The code works fine in Windows Explorer. -------------------------------------------------------- def getImageFormat(CommonsMultipartFile imageFile) {
0
8996
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9386
jinu1996
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...
1
9333
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,...
0
9254
tracyyun
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...
1
6799
isladogs
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...
0
6078
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();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.