By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,925 Members | 727 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,925 IT Pros & Developers. It's quick & easy.

Help, image script won't work!!

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.