469,898 Members | 1,538 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Help, image script won't work!!

Jim
Hey guys
I DESPERATLY need some help with this small javascript i have on this
website. All that it's supposed to do is change the button image once
it's pressed but alas... I copy-pasted the code as it was given to me
from Imageready but it won't work. The event that i wanted (and
"created" with Imageready) was ondown. The code is this:
ONMOUSEOUT="changeImages('company', 'Images/company.gif'); return true;"
ONMOUSEDOWN="changeImages('company', 'Images/company-down.gif'); return
true;"
ONMOUSEUP="changeImages('company', 'Images/company.gif'); return true;"
I can't find anything wrong with it, but then again i really don't know
javascript.
If anyone wants to help, you can look at the whole source at
www.team-x.gr/main.html. I've previewed the page with both IE and
FireFox, the button still won't work but the fnny thing is that in
preview mode in Imageready, the button worked. The whole site design (at
least what i was going to do later) is based on if i can get this thing
to work.
The site even isn't half finished, and also its in greek so please don't
think its adevertising.
Thanks a bunch, all help would be REALLY appreciated!
Jul 23 '05 #1
1 1355
Jim wrote:
Hey guys
I DESPERATLY need some help with this small javascript i have on this
website. All that it's supposed to do is change the button image once
it's pressed but alas... I copy-pasted the code as it was given to me
from Imageready but it won't work.


There are two errors:

1) In the functions you are referencing document.Images, while it should be
document.images (with a lowercase `i`, JavaScript is case sensitive)
2) The image names are incorrect. When you call changeImages('company',
'Images/company.gif'), the image should not be called `work` but `company`
JW

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Oliver Spiesshofer | last post: by
19 posts views Thread by Allen Thompson | last post: by
14 posts views Thread by mikeoley | last post: by
14 posts views Thread by squash | last post: by
17 posts views Thread by so many sites so little time | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.