View Full Version : help with two mouseover assignments
05-08-2004, 05:27 PM
i really need help with this and i'm hoping that i'm only missing something small... actually, i'm hoping that it is possible, period...
i need to assign two mouseover functions to one button... you can view my progress at:
as you can see, i have the larger of the mouseovers (an external image swap) working fine, but the simple image exchange isn't...
is this possible and if so can you help explain what i am doing wrong???
thank you so much in advance...
05-10-2004, 02:30 AM
You had a few misplacements of quotation marks. Try out the following and see if it works.
<a href="URL.HTML" target="_blank" onmouseover="changeImages('otherImage', 'otherImage01'); document.01jpg.src='over_small.jpg';" onmouseout="changeImages('otherImage', 'otherImageDefault'); document.01jpg.src='orig_small.jpg';"><img src="orig_small.jpg" width="50" height="50" border="0" cache="true" name="01jpg"></a>
05-10-2004, 05:10 AM
i've replaced the code with that which you suggested, but now you'll notice that neither images are swapping on mouseover:
(reminder - this is the page that i posted before:
05-10-2004, 06:26 PM
Ok I'm going to number your images:
1 - small image at the top
2 - large image in the middle/right
3 - small image at the bottom
So let me get this right:
-mouseover 1, changes 2
-mouseout 1, changes 2
-mouseover 2, changes 1 and 3?
-mouseout 2, changes 1 and 3?
-is there a mouseover/out on 3? if so what happens?
Please clarify what's supposed to happen so we can help you better.
05-10-2004, 07:07 PM
okay, i hope i can be clearer (a weakness of mine)...
i've changed the page again and hopefully i can clear things up this way...
i'm now showing two small images in the top left corner that are connected by mouseover event to the large image to the right.
as you'll see, when you mouseover each small image, there is a respective large image for EACH...
this mouseover is working the way i would like it to.
in addition to this, i would like the small images to change on the same mouseover event - there is only one image ("over_small.jpg") that i would like to apply to BOTH small images...
user mouseover "orig_small1.jpg", small image changes to "over_small.jpg" AND "orig_large.jpg" changes to "over_large1.jpg"
user mouseover "orig_small2.jpg", small image changes to "over_small.jpg" AND "orig_large.jpg" changes to "over_large2.jpg"
does this help???
05-10-2004, 07:57 PM
Oh I see, so the small image you're mousing-over, you want that image to change to a different image?
Not so bad:
<A ONMOUSEOVER="changeImages('otherImage', 'otherImage01'); this.src = 'over_small.jpg'" ONMOUSEOUT="changeImages('otherImage', 'otherImageDefault'); this.src = 'orig_small1.jpg'"; document.01jpg.src='50p01.jpg';><img src="orig_small1.jpg" width="50" height="50" border="0" cache="true" name="01jpg"></a>
The same goes for the other image.. I think that should work. Let me know how you make out with it.
05-11-2004, 05:59 AM
well, i tried that but nothing seems to be affected... the buttons still act the same:
hmmm... maybe i'm still not communicating my desires correctly...
on mouseover i want both the small and large images to change simultaneously...
05-11-2004, 06:42 AM
Whoops! My fault... (you're communicating just fine!) use THIS code:
<A ONMOUSEOVER="changeImages('otherImage', 'otherImage01'); document.images['01jpg'].src = 'over_small.jpg'" ONMOUSEOUT="changeImages('otherImage', 'otherImageDefault'); document.images['01jpg'].src = 'orig_small1.jpg'"; document.01jpg.src='50p01.jpg';><img src="orig_small1.jpg" width="50" height="50" border="0" cache="true" name="01jpg"></a>
I think that should work.
05-11-2004, 07:21 AM
you are my hero!!! now for me to examine your code so that i can understand what is happening AND apply it to the actual design that i am doing... thank you thank you thank you!!!
11-16-2004, 08:54 AM
im so sorry if im not suppose to be adding to this thread, but i'm truly stuck, and I have the same prob as described by the thread previously. I am stuck for the last 1 hour, and found this site on google, hopefully someone is out there reading, PLEASE!! i'M trying to figure out how to proceed. Anyhow, I am trying to change two images when hovering over one image:
(when hovering over exhibitions, i want the image to change as well as the picture.) as you can see, i got one, but not the other, I tried to apply the solution that was previously given, (and the empty code is in the bottom for reference), but it didn't work. someone please HELP!! :confused: :( :confused: :(
Also, the link I associated with it doesn't seem to be working. HELP!! :(
11-16-2004, 08:51 PM
The image swap code you've got looks like it already handles multiple image swaps but you've got to provide all FOUR parameters for each image to be swapped. You do not need to provide any parameters at all for the mouseout code.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.