Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Help, image script won't work!!

Reply
Thread Tools

Help, image script won't work!!

 
 
Jim
Guest
Posts: n/a
 
      05-23-2004
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!
 
Reply With Quote
 
 
 
 
Janwillem Borleffs
Guest
Posts: n/a
 
      05-23-2004
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute a script from another script and other script does notdo busy wait. Rajat Python 3 01-08-2010 02:05 PM
RE: How to execute a script from another script and other script doesnotdo busy wait. VYAS ASHISH M-NTB837 Python 2 01-07-2010 08:18 PM
wx.Image: Couldn't add an image to the image list. Laszlo Zsolt Nagy Python 1 01-26-2005 09:55 PM
Random Image Script for more than one image slot Linda Javascript 5 01-07-2005 06:01 PM
How to make Perl Script "POST" call from another Perl Script??? Wet Basement Perl 1 07-15-2003 10:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57