# javascript functions working only sometimes



## radical1321 (Jun 8, 2011)

hey, this is really weird...
im working on my online portfolio and I have an external javascript file that has functions to add a piece to the collection...

here is the link to my page
illustrator

the javascript file is here
http://www.freewebs.com/harrisonengle/harrisonengleweb/add.js 

as you see some of the pieces will show up, and some wont. they are all going off the same function, and all work when i run the html off my computer harddrive rather than the freewebs server.

Also, i understand that formatting of the site will get all messed up when it is ran in different browsers... for instance it works in firefox and safari now, but not IE and Chrome... any suggestions? 

Sorry im kind of new at this and teaching myself...

i appreciate any help you can give me!!!

~Harrison


----------



## brent.charlebois (May 8, 2007)

Try putting your elements in divs and use css to do the formatting in IE and Chrome.

BrentC


----------



## Laxer (Dec 28, 2010)

This is pretty slow...

If you have some knowledge in JS i suggest looking at Jquery for flashy things like this...

If you still wish to use your script why not just apply the script to the image you put in instead of running it through the JS first?

<img src="img" alt="img" onclick="script();" />

This should improve load times as well  (probably very slightly thou  )


----------

