Log in

View Full Version : I need a little help on a script



Geezer D
04-05-2009, 04:11 PM
Hi, all.

I have this script on my clients site, to make 2 images preload before they marquee (...I know... but that's what he asked for...;)


<script>
var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("images/banner.gif","images/america.png")
</script>

Problem is, the images are visible as they load up, then just sit there for a half a second, then disappear, and finally the scroll begins.
This happens in Firefox, but it seams to work OK in IE.

I need them to not show until the marquee starts.

Can anyone rewrite it so it does that?

I'm no coder, I just copied that off a tutorial site and added my image URL's, so if anyone could edit that for me and post the edit up here, or give me a different script, I'd appreciate it, thanks.

Nile
04-06-2009, 04:41 AM
Please post a link to the page on your site that contains the problematic script so we can check it out.
Please post a link to the site you found this script at.

And is that all the code?

Geezer D
04-06-2009, 04:57 AM
Hi, Nile.
I'm not sure where the code came from, it was a response to someone elses question in some old forum post that came up in a Google search.
That was all of the code. I deleted that script, since it did absolutely nothing in Firefox, and IE7 always displayed the marquee as I needed.

Site is:
http://www.selfdefensetrainingcentersofamerica.com/

Nile
04-06-2009, 01:40 PM
Is the marquee supposed to be in that little grey box below the header? Because I'm not seeeing anything. (Using Chrome)

Geezer D
04-07-2009, 05:50 AM
Is the marquee supposed to be in that little grey box below the header? Because I'm not seeeing anything. (Using Chrome)

?
The intro page, with the big marqueeing picture dropping down and the word 'America' marqueeing in from the left.

Nile
04-07-2009, 03:19 PM
I don't think you should actually be using a <marquee> tag, try the text and image crawle (http://www.dynamicdrive.com/dynamicindex2/crawler/index.htm)r.