how to achieve onmouseover/onmouseout effect?

how to achieve onmouseover/onmouseout effect?

am 11.11.2007 06:34:15 von r_ahimsa_m

Hello,
I am learning HTML/CSS/JavaScript and I don't know how to do the following
thing (I have little experience).
On page I have four images (.gif) with captions (also images, .gif). I would
like to have such effect:
I the user sets mouse pointer over the image then caption image is changed;
when the user leaves the image,
the caption is restored.
For example the image Association.wmf has caption Association_caption.gif,
and when the user set mouse pointer over
Association.wmf the caption should be changed to Association_over.gif.
Here is what I have done:












onmouseover="document.linkAssociation.src='images/Associatio n_over.gif'"
onmouseout="document.linkAssociation.src='images/Association _caption.gif'">
/> 

width="200" /> 


onmouseover="document.linkCenter.src='images/Center_over.gif '"
onmouseout="document.linkCenter.src='images/Center_caption.g if'">
 

  width="200" />


onmouseover="document.linkClub.src='images/Club_over.gif'"
onmouseout="document.linkClub.src='images/Club_over.gif'">
 

/> 


onmouseover="document.linkVoluntary.src='images/Voluntary_ov er.gif'"
onmouseout="document.linkVoluntary.src='images/Voluntary_cap tion.gif'">
 

  width="200" />




I don't know why captions are not changed, I mean when the user sets mouse
pointer over image the caption remains unchanged.
Could you help me please?
/RAM/

Re: how to achieve onmouseover/onmouseout effect?

am 11.11.2007 10:10:08 von Bone Ur

Well bust mah britches and call me cheeky, on Sun, 11 Nov 2007 05:34:15
GMT R.A.M. scribed:

> Hello,
> I am learning HTML/CSS/JavaScript and I don't know how to do the
> following thing (I have little experience).
> On page I have four images (.gif) with captions (also images, .gif). I
> would like to have such effect:
> I the user sets mouse pointer over the image then caption image is
> changed; when the user leaves the image,
> the caption is restored.
> For example the image Association.wmf has caption
> Association_caption.gif, and when the user set mouse pointer over
> Association.wmf the caption should be changed to Association_over.gif.
> Here is what I have done:
>
>


>
>
>
>
>
>
>
>
>
>

> > onmouseover="document.linkAssociation.src='images/Associatio n_ove
> r.gif'"
> onmouseout="document.linkAssociation.src='images/Association _capt
> ion.gif'"> > width="200"
> /> 

> > width="200" /> 
>

>

> > onmouseover="document.linkCenter.src='images/Center_over.gif '"
> onmouseout="document.linkCenter.src='images/Center_caption.g if'">
>   > />
  > src="images/Center_caption.gif"
> width="200" />
>

>

> > onmouseover="document.linkClub.src='images/Club_over.gif'"
> onmouseout="document.linkClub.src='images/Club_over.gif'">
> > /> 
> width="200"
> /> 
>

>

> > onmouseover="document.linkVoluntary.src='images/Voluntary_ov er
> .gif'"
> onmouseout="document.linkVoluntary.src='images/Voluntary_cap ti
> on.gif'">
>   > />
  > src="images/Voluntary_caption.gif"
> width="200" />
>

>

>

>
> I don't know why captions are not changed, I mean when the user sets
> mouse pointer over image the caption remains unchanged.
> Could you help me please?
> /RAM/

Try using onmouseover="document.getElementById
('linkAssociation').src='images/Association_over.gif'"

and

src="images/Association_caption.gif" width="200" alt="" />

--
Bone Ur
Cavemen have formidable pheromones.

Re: how to achieve onmouseover/onmouseout effect?

am 11.11.2007 13:43:18 von r_ahimsa_m

U¿ytkownik "Bone Ur" napisa³ w wiadomo¶ci
news:Xns99E5160DC5943boneurhyphe@85.214.62.108...
> Try using onmouseover="document.getElementById
> ('linkAssociation').src='images/Association_over.gif'"
>
> and
>
> > src="images/Association_caption.gif" width="200" alt="" />

Captions still don't change.
Please help.
/RAM/

Re: how to achieve onmouseover/onmouseout effect?

am 11.11.2007 19:23:12 von Bergamot

R.A.M. wrote:
>
> For example the image Association.wmf has caption Association_caption.gif

FYI, wmf files are not suitable for web use.

> and when the user set mouse pointer over
> Association.wmf the caption should be changed to Association_over.gif.
> Here is what I have done:

Post a URL.

--
Berg