PDA

View Full Version : Pausescroller image onload



pjrobertson
05-26-2006, 07:44 AM
http://www.gangguevara.com/naturcymru
I've had a look around, but can't seem to find the exact thing I wanted.
I'm using the pausescroller for images, and no text, after the first pausecontent loads, the scroller begins, but the other images in pausecontent[1]/[2]/[3] haven't loaded, so the scroller continues while loading the images. I'm looking for the right "body onload=" code so that when the scroller begins, all images are loaded.
It's not too bad with broadband, but for people on dial up, I'm sure it would be a pain.

Thanks

jscheuer1
05-26-2006, 08:00 AM
http://home.comcast.net/~jscheuer1/side/marquee_v_slide_pause_top.htm

pjrobertson
05-26-2006, 10:06 AM
there's no way of doing it with this scroller??
I'll use that one if not. (It doesn't looka s if you can put pictures next to each other with that one... :()
thanks anyway!

jscheuer1
05-26-2006, 05:00 PM
With a little modification, pictures could be put next to each other. Or, you could add a preload script to the script you already set up. I'll look into both ideas when I get a chance.

jscheuer1
05-27-2006, 06:06 AM
OK, I did get a chance to look further into your page and its problems with the images. I tried setting up a local demo but, your server doesn't play nice when you try to get it to play host to your images for an off site demo. This could just be security on their part or you may have the permissions set too tightly on your images and/or your image directory. If you don't generally 'get under the hood' and adjust this sort of thing, don't worry about it. If you know what I am talking about, loosen the permissions as the images are not loading as freely as they would with broader permissions. I only mention this because if it is something you did to protect your images, it doesn't work, I can copy them. I just can't get them to host remotely unless they are already cached here, and it does slow caching even under normal circumstances and may cause problems with the solution I am about to give you. Use the generic image loading script described here:

http://www.dynamicdrive.com/forums/showpost.php?p=37155&postcount=2

Instead of wrapping your HTML in the division as instructed, wrap this:


<script type="text/javascript">

//new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)

new pausescroller(pausecontent, "pscroller1", "someclass", 2000)
document.write("<br />")



</script>

I also would highly recommend that you get rid of the wrapping link as this often causes problems in IE:


<a href="contents18.htm" target="_self"> <script type="text/javascript">

//new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)

new pausescroller(pausecontent, "pscroller1", "someclass", 2000)
document.write("<br />")



</script></a>

You can, if you desire, add links to each individual pausecontent[x] entry, ex:


pausecontent[0]='<a href="contents18.htm" target="_self"><img src="ht ... <p>&nbsp;</p></a>'