?

Log in

No account? Create an account
What I say? Who knows me? What I said? What I am? disturbing.org.uk Previous Previous Next Next
Javascript help wanted! - Corrosive Shame
Therapy for Life
kneeshooter
kneeshooter
Javascript help wanted!
I've got a bit of an issue preloading images using javascript using a bit of code.

Broadly speaking, I have bit of .js which generates image map code from the title of each image map section and would like to use this information to also preload the appropriate gif rather than manually specify them all.

I'm "hacking in the dark" a bit, but if anyone could look at my code and see why it's not working properly then I'd appreciate it.

Tags: ,

6 lies or Lie to me
Comments
richc From: richc Date: August 23rd, 2006 11:43 am (UTC) (Link)
I'd rather need to see the code to be able to help....
kneeshooter From: kneeshooter Date: August 23rd, 2006 11:44 am (UTC) (Link)
I understand that - I just wasn't going to spam everyone with it! What's a good email for you and I'll take the conversation there...
richc From: richc Date: August 23rd, 2006 02:17 pm (UTC) (Link)
richc at lrp _ world dot org
(Deleted comment)
kingandy From: kingandy Date: August 23rd, 2006 11:59 am (UTC) (Link)
Image map? Ooooh. Tricksy.

The code I pointed you at should be adaptable for that, except instead of having an "on" and "off" image object for each image you'd need one for each map area, eg "map_manchester", "map_stockport" (assuming a literal map!). Then reference it with "map_manchester.src".

Your "off" code would then be a lot simpler as you'd only have the one image to turn off...
kneeshooter From: kneeshooter Date: August 23rd, 2006 12:07 pm (UTC) (Link)
Your code is nice, I just want to get the .js syntax write to build that into a loop in my existing code.
6 lies or Lie to me