dljeff
Newbie
Posts: 1
Registered: 7/10/2005
Member Is Offline
|
| posted on 7/10/2005 at 10:04 PM |
|
|
mouseover not working
my html file has a table with 2 columns. I have the scroller in the first column and the second column has an image defined to it
<img src="images/brides/DSCF0020.jpg" name="image_big" id="image_big" width="308" height="452">
then in my scroller I have multiple images scroller, and if one of the images is moused-over (or clicked) I want to change the image_big src above
<a href="javascript:;" onMouseOver="MM_swapImage('image_big','','../images/brides/DSCF0020.jpg',1)"
onMouseOut="MM_swapImgRestore()"><img src="../images/brides/DSCF0020.jpg" width="175" height="200" border="0"
alt=""></a>
I've tried multiple ways - even putting the image_big in with cont1.html file as well, but no luck either way.
How do I implement mouseover to change the original image_big?
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 7/11/2005 at 08:06 AM |
|
|
You should consider when refering images in your hover functionality that scroller content is located in iframe.
|
|
|
elviscat
Junior Member
Posts: 7
Registered: 1/25/2005
Member Is Offline
|
| posted on 12/2/2005 at 09:49 AM |
|
|
and therefore what does this mean , when referrring to images?
Could you expand
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 12/6/2005 at 07:11 PM |
|
|
You are referring to MM_swapImage function from iframe (scroller content is located in the iframe), so if the function is defined within your page
try to call:
parent.MM_swapImage(..)
|
|
|
elviscat
Junior Member
Posts: 7
Registered: 1/25/2005
Member Is Offline
|
| posted on 12/7/2005 at 01:36 PM |
|
|
rock,
I have tried everything and it is still not working,
in the default.asp page at the top is:
<SCRIPT LANGUAGE="JavaScript">
<!-- hide from non JavaScript Browsers
Rollimage = new Array()
Rollimage[0]= new Image(78,16)
Rollimage[0].src = "images/buy_album_icon.gif"
Rollimage[1] = new Image(78,16)
Rollimage[1].src = "images/buy_album_icon_over.gif"
function SwapOut(){
document.buy.src = Rollimage[1].src;
return true;
}
function SwapBack(){
document.buy.src = Rollimage[0].src;
return true;
}
// - stop hiding -->
</SCRIPT>
and the cont1.html page the loads at the rollover image:
<A HREF="" onmouseover="SwapOut()" onmouseout="SwapBack()"><IMG SRC="images/buy_album_icon.gif" NAME="buy" WIDTH=78 HEIGHT=16
BORDER=0></A>
I have tried putting the javascript in the cont page, doesn't work, I have tried as it is now, doesn;t work.
I have tried the MM function, doesn;t work, using parent.MM doesn't, m8 can you test this and see if you can actually get this working please.
This bollox is consting me a fortune
Regards
Kev
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 12/7/2005 at 03:07 PM |
|
|
Try files from attachment.
Attachment: rollover.zip (7.94kb)
This file has been downloaded 630 times
|
|
|