Tanvir
Mar 20 2005, 08:58 PM
| | I want to preload some images with my page and after searching in google I found this code but it doesn't seem to work. Cany anyone tell me what is wrong?
<script language="JavaScript"> <!-- Image1= new Image() Image1.src = "Slice3_over.gif" Image2 = new Image() Image2.src = "Slice4_over.gif" Image3 = new Image() Image3.src = "Slice5_over.gif" Image3 = new Image() Image3.src = "Slice6_over.gif" --> </script> |
Reply
rvovk
Mar 20 2005, 09:22 PM
I use XHTML and CSS code for preloading some images that are used in layout of my page. This is HTML code for one image: <div class="hiddenPic"><img src="images/layout/over.jpg" alt="hidden"/></div>Whereas images/layout/over.jpg is path to yours image file, div class="hiddenPic" defines DIV class. And CSS code is this: .hiddenPic {display:none;}This CSS rules defines that div class HIDDEN is not displayed on the screen, only is preloaded. I guess Javascript isn't too good choice in your case, cause some, but this is very few people have Javascript disabled, thats why I must do my Pop-Up image in XHTML/CSS way. Best regards, Robert.
Reply
webaurores
Mar 21 2005, 01:48 AM
i think the XHTML/CSS solution is too theoric. i mean, it would work with most of your visitors, but not all of them. because MANY people uses old browsers, which doesn't support whether XHTML or CSS. and, sometimes, those browsers aren't too old. check it out on Firefox. it won't work; i tried something similar to it some time ago: i put SEO information about a page in the begging of it (so Google gives it more value), but it looked awful in the layout, so i tried to hide that info with a CSS code like rvovk's, and it didn't work with Firefox (it did with IE5).
Reply
rvovk
Mar 21 2005, 05:18 AM
Check it out on my site, here, and you will see that it works. I tried it IE6 and Firefox.
Reply
Vacant
Mar 24 2005, 07:09 PM
QUOTE(webaurores @ Mar 21 2005, 01:48 AM) i think the XHTML/CSS solution is too theoric. i mean, it would work with most of your visitors, but not all of them. because MANY people uses old browsers, which doesn't support whether XHTML or CSS. and, sometimes, those browsers aren't too old. check it out on Firefox. it won't work; i tried something similar to it some time ago: i put SEO information about a page in the begging of it (so Google gives it more value), but it looked awful in the layout, so i tried to hide that info with a CSS code like rvovk's, and it didn't work with Firefox (it did with IE5). CODE <img src="blah.jpg" width="1px" height="1px" />
Stick this on the homepage (or whatever, the page before the one you want the preloading done on). This will load the image, but will only display 1px of it (which you can't see). Do this for every image, and in theory it'll act as a preload because it will load the image first. Its a quick fix, but it works for me.... - Vacant.
Reply
kawasu
Mar 29 2005, 10:42 AM
hmm... i forgot wat i used to preload images. i think it was a javascript but i really can't remember. anyway, if u ask me i really wouldn't use a preload script. it's alright for dial-up users but nowadays everyone is on broadband. having loading scripts only slows broadband in the end, really not worth implementing them anymore. in the end it's ur choice, i just think they're a waste of time.
Reply
Vacant
Apr 1 2005, 11:40 PM
QUOTE(kawasu @ Mar 29 2005, 10:42 AM) it's alright for dial-up users but nowadays everyone is on broadband. in the end it's ur choice, i just think they're a waste of time. Everyone, in fact, is NOT on broadband. Places like Japan may be on 12 mb connections but over here in the UK we've only just discovered broadband... and most people don't have it here. You need to think about every user to your site. However, I think that in most cases the preload is not essential anyway...
Reply
mizako
Apr 4 2005, 11:30 AM
With Javascript i preload images with: if (document.images) { folderopen= new Image(16,16); folderopen.src="buttons/node_open.png"; folderclose= new Image(16,16); folderclose.src="buttons/node_close.png"; textimage = new Image(16,16); textimage.src="buttons/text.png"; arrowopen = new Image(16,16); arrowclose = new Image(16,16); arrowopen.src="buttons/arrow_open.png"; arrowclose.src="buttons/arrow_close.png"; } Then for example if you want to change the image of an element into your Javascript code you write simply: foldericon=arrowclose.src
Reply
CrashCore
Apr 11 2005, 01:11 AM
Mizako, I wouldn't say that's quite so simple. The others that posted before you are much less code. I like rvovk's way the best, and it seems to work on his site for me, and I'm using Firefox (who isn't?). It doesn't work as well on IE (I only have it because my family uses it  ), but my IE has been screwed up for a long time. It doesn't work with custom javascripts anymore, and the css is screwed up a lot of time, and installing SP2 with the new version of IE didn't help at all.
Reply
mizako
Apr 11 2005, 06:58 AM
QUOTE(CrashCore @ Apr 11 2005, 01:11 AM) Mizako, I wouldn't say that's quite so simple. The others that posted before you are much less code. To preoload just an image takes 5 lines of code. Two images 7. Not that much :-)
Reply
Latest Entries
BuffaloHELP
Apr 23 2005, 06:41 PM
heavensoundsI do not believe one needs to have preload images. One's browser accesses images, for this discussion sake, when the browser calls for and when the viewer clicks on the link (does this make sense?). But here is a thought: What if one's page contains a tree menu made up with graphics as a background or such? And within that tree menu there are submenus that also require graphics as a background...etc? When a viewer expands a particular menu tree, it will take a short time to load graphics it needed to show it as one programmed. But in the mean time, the viewer would see that "ugly" X picture until that graphic is fully loaded. So, the conclusion is that it just makes the viewing page a little enjoyable (as I tried to say on my previous post). However, if one's hosting service has limited bandwidth one might face a problem. By preloading images one is using up bandwidth that perhaps might not have needed by the viewer. And thus, the browser downloads that entire graphics to the viewer’s cache and never gets the chance to be "used." I have a tree menu style that mimics window's help menu (with closed and open folders, little dotted lines to connect them) and each graphics are 1k. Now it may not be much but, 1kB x 26 categories x 3 graphics per category = 78kB. I have an average unique visitor of 58 a day so that's 78kB x 58 = 4,524kB (4.5MB). That's 31.668MB a week, 126.672MB a month (4 weeks)... it adds up. So, decide how you want to present your web page and use it discretionally. Good luck.
Reply
heavensounds
Apr 23 2005, 12:39 PM
Can someone please explain to me why one would acctualy use PRE LOADING IMAGES... What is the whole idea?? Is it possible that it would pre load some images which are on lets say music.html and i am currently on the index.html page?? This would be nice because the other page would load when someone is looking the index page and then don't have to wait for the next one to load cos' it would have already beed loaded... Thx for any help...GREETZ
Reply
Recent Queries:--
preoload em gif - 141.75 hr back. (1)
Similar Topics
Keywords : pre load images- Getting Flash Images On A Site
- (1)
- 1000 Free Psd Icon Images
- They are very cool (10)
Here it is: CODE http://www.stud.uni-hannover.de/~ngthanh/1000_ico/page_01.htm
http://www.stud.uni-hannover.de/~ngthanh/1000_ico/page_02.htm
http://www.stud.uni-hannover.de/~ngthanh/1000_ico/page_03.htm
http://www.stud.uni-hannover.de/~ngthanh/1000_ico/page_04.htm
http://www.stud.uni-hannover.de/~ngthanh/1000_ico/page_05.htm Carpe diem....
Best Way For Role-over Images?
- (2)
Hi Guys, I'm trying to work out the best way to make this site. This is what I have made so
far using CSS, divs, and spans: Site: http://www.frusciante.trap17.com/slices/coded.html CSS:
http://www.frusciante.trap17.com/slices/style.css I found a problem with this attempt when you
resize the browser window all the images move with it. Any suggestions on how to fix this? So
basically what i want to be able to do with this is have those buttons light up some how when i roll
over them. My idea was to have each button on a fairly small image, that way you don...
Hoverbox Image Gallery
- a pretty cool way to present Images on a page (1)
Hoverbox is an Image Gallery which I found some time ago. The feature I like the most about it is
the effect of the "on-hover" state which changes the image from a small thumbnail size to a
"mid-size" image. Essentially, it doubles the size of the picture when your mouse hovers on it. The
Hoverbox uses CSS for the size change and needs no javascript to perform. In fact, it works the same
without javascript. And... it apparently works in IE. The CSS method used includes 'hiding'
the larger image until the 'on-hover' state is reached. As you know, IE...
How Can I Make My Site Load And Work Faster
- How can i make my site load and work faster (9)
i just wanted to know some extra tricks and tips i can use to make my site work great, being fast,
and work well on all browsers. i think this will also help a lot more people and not just me. so
lets start a list of things we can do to make our site work better, faster. start your commenting....
How Can I Make My Site Load And Work Faster?
- (17)
i just wanted to know some extra tricks and tips i can use to make my site work great, being fast,
and work well on all browsers. i think this will also help a lot more people and not just me. so
lets start a list of things we can do to make our site work better, faster. start your commenting....
Activation Code Images, How?
- need help with activation code images (3)
hi everbody, I am creating this website for an online game KHAN which is of course hosted by
Trap17.com. Anyway, it accepts membership since its services includes message board for every member
and message board for groups that members created and of course personal messages. So here is my
problem, since it accepts membership it requires applicants to fill up forms which ask their e-mail
address, I want to know how make an activation code that is an image. Get my point? /smile.gif'
border='0' style='vertical-align:middle' alt='smile.gif' /> it is basically like her...
Oscommerce Images?
- (4)
Does anyone know where I can find some really good oscommerce replacement images? The ones that
come with the program don't fit in with my store. I found a contribution that gets rid of them,
but I am looking for some cool images to replace them with. I'm also looking for them in pink
preferrably, but I can always change the color in photoshop. Also, for anyone who wants to know,
I found a cool program that lets you generate oscommerce buttons to fit the color pallete of your
store at http://oscommerce-buttons.org/ Well back to the grind. Hopefully my st...
Great Background Images
- Don't miss them! (1)
Here it is: http://home.arcor.de/stefun132/Hintergrund/ ...
Great Background Images
- Don't miss them! (2)
Here it is: http://home.arcor.de/stefun132/Hintergrund/ ...
How Do I Embed Scripts Into Images?
- (7)
I've always wondered but I never really knew how......
Cropped Thumnail Images?
- newbie.. (0)
Is there software that will allow you to crop images when you make a have a lot of pics that's
different sizes? I only use Frontpage & whenever I auto thumbnail images that are different
sizes..they come out looking very disorganized. I've seen on some sites where they're able
to make thumbnails all the same size & the thumbnail is not the entire pic, but rather the central
focus..for example the thumbnail just shows the head, while the actual picture is a view of the
entire body....
Looking for pre, load, images
|
|
Searching Video's for pre, load, images
|
advertisement
|
|