Here is how you do this:

First a script block at the top of the page:

<SCRIPT LANGUAGE="JavaScript">
if (document.images)
{
 Links_over  = new Image(); Links_over.src  = 'Images/links_over.GIF';  Links_off =
new Image(); Links_off.src  = 'Images/links_off.gif';
 Code_over  = new Image(); Code_over.src  = 'Images/Code_over.GIF';  Code_off = new
Image(); Code_off.src  = 'Images/Code_off.gif';
 CS_over  = new Image(); CS_over.src  = 'Images/CS_over.GIF';  CS_off = new
Image(); CS_off.src  = 'Images/CS_off.gif';
 Forums_over  = new Image(); Forums_over.src  = 'Images/Forums_over.GIF';
Forums_off = new Image(); Forums_off.src  = 'Images/Forums_off.gif';
 Home_over = new Image();Home_over.src = 'Images/Home_over.GIF';Home_off = new
Image();Home_off.src = 'Images/Home_off.gif';
 News_over  = new Image(); News_over.src  = 'images/News_over.GIF';  News_off = new
Image(); News_off.src  = 'images/News_off.gif';


}

function locswapOver(name)
{
    if (document.images)
        document.images[name].src = eval(name + '_over.src');
}

function locswapOff(name)
{
    if (document.images)
        document.images[name].src = eval(name + '_off.src');
}
</SCRIPT>


Then, wrap the image/link in code which uses the mouseover event like this:

 <A href="Code.jsp?Cat=ALL" onMouseOver="locswapOver('Code')"
onMouseOut="locswapOff('Code')">
            <IMG Name="Code" SRC="Images/Code_off.gif" WIDTH=150 HEIGHT=55
BORDER=0  ALT="Geek Code Library">
                          </A>

Julia

Jorge Barrera wrote:

> No need for dhtml here.  Simple JavaScript.  Toggle the image.src property
> of the desired image.  Steal the code of a page that has the functionality
> you want.
> Regards
> Jorge
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of sumit shah
> Sent: Tuesday, September 12, 2000 12:20 PM
> To: [EMAIL PROTECTED]
> Subject: javascript and dhtml
>
> hi all,
>    this is more of a javascript /dhtml question. I want some good things on
> my home page.
>    i have four images in four coulumns side by side and i want that
> onMouseOver on one image a different image be shown in the corresponding
> column below the main image, also that it should stay there till i go to the
> other image.is it possible anyhow.
>
> is it possible,
> please help,
> thanks.
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

--
  H e a l t h S t r e a m,   I n c.
  Julia Reynolds - Systems Developer
  209 10th Ave. South Ste. 450 - Nashville, TN 37203
  phone: (615) 301-3220 - fax: (615) 301-3200

  email: [EMAIL PROTECTED]
  Web Site: http://www.cmecourses.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to