Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 6th, 2004, 01:37 PM
Rich's Avatar
Rich Rich is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Fort Lauderdale, FL
Posts: 152 Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 49 m 15 sec
Reputation Power: 22
Elegant Menu Mouseover

<!DOCTYPE HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Mouseover Demo</TITLE>
</HEAD>
<BODY BGCOLOR=aqua>
<FONT FACE=ARIAL COLOR=navy><CENTER><H1>Mouseover Demo</H1></CENTER>
this is a more elegant demonstartion of "On mouseover" to change images.<P></FONT>
<HR>
<SCRIPT LANGUAGE=JAVASCRIPT>
<!--
var darkened_pics = new Array();
var lighted_pics = new Array();
var clicked_pics = new Array();


function preloadButtonSet(num,dark,light,clicked) {
darkened_pics[num] = new Image();
darkened_pics[num].src = dark;
lighted_pics[num] = new Image();
lighted_pics[num].src = light;
clicked_pics[num] = new Image();
clicked_pics[num].src = clicked;
}
// ***** MODIFY THE VARIABLES BETWEEN TH
// ESE COMMENTS *****
// define the image swapping in the foll
// owing format:
// preloadButtonSet(button_num,dark_butt
// on_src,light_button_src,clicked_button_s
// rc)
preloadButtonSet(0,"ann1.jpg","ann2.jpg","goforit.jpg");
preloadButtonSet(1,"betty1.jpg","betty2.jpg","goforit.jpg");
preloadButtonSet(2,"candy1.jpg","candy2.jpg","goforit.jpg");
preloadButtonSet(3,"diane1.jpg","diane2.jpg","goforit.jpg");
preloadButtonSet(4,"elsie1.jpg","elsie2.jpg","goforit.jpg");
preloadButtonSet(5,"fiona1.jpg","fiona2.jpg","goforit.jpg");
// ***** MODIFY THE VARIABLES BETWEEN TH
// ESE COMMENTS *****
// -->
</SCRIPT>
<SCRIPT LANGUAGE=JAVASCRIPT>
<!--


function lighten(num) {
if (document.images)
eval("document.button"+num+".src = lighted_pics["+num+"].src;");
return false;
}


function darken(num) {
if (document.images)
eval("document.button"+num+".src = darkened_pics["+num+"].src;");
return false;
}


function clicked(num) {


if (document.images) {
eval("document.button"+num+".src = clicked_pics["+num+"].src;");
setTimeout("document.button"+num+".src = darkened_pics["+num+"].src;",350);
}
return true;
}
// -->
</SCRIPT>
<CENTER>
<TABLE COLS=3 border=0 WIDTH="378">
<TR><TD align=left><A href="test.htm#ann" onMouseOver="return lighten(0)" onMouseOut="return darken(0)" onClick="return clicked(0)" target="_top"><Img src="ann1.jpg" name="button0" width=111 height=101 border=0 ALT="Ann"></A>
</TD>
<TD align=center>
<A href="test.htm#betty" onMouseOver="return lighten(1)" onMouseOut="return darken(1)" onClick="return clicked(1)" target="_top"><Img src="betty1.jpg" name="button1" width=111 height=101 border=0 ALT="Betty"></A>
</TD>
<TD align=right>
<A href="test.htm#candy" onMouseOver="return lighten(2)" onMouseOut="return darken(2)" onClick="return clicked(2)" target="_top"><Img src="candy1.jpg" name="button2" width=111 height=101 border=0 ALT="Candy"></A>
</TD>
</TR>
<TR><TD align=left>
<A href="test.htm#diane" onMouseOver="return lighten(3)" onMouseOut="return darken(3)" onClick="return clicked(3)" target="_top"><Img src="diane1.jpg" name="button3" width=111 height=101 border=0 ALT="Diane"></A>
</TD>
<TD align=center>
<A href="test.htm#elsie" onMouseOver="return lighten(4)" onMouseOut="return darken(4)" onClick="return clicked(4)" target="_top"><Img src="elsie1.jpg" name="button4" width=111 height=101 border=0 ALT="Elsie"></A>
</TD>
<TD align=right>
<A href="test.htm#fiona" onMouseOver="return lighten(5)" onMouseOut="return darken(5)" onClick="return clicked(5)" target="_top"><Img src="fiona1.jpg" name="button5" width=111 height=101 border=0ALT="Fiona"></A>
</TD>
</TR>
</TABLE>
</CENTER>
<HR>
<CENTER>
<FONT FACE=ARIAL COLOR=navy SIZE=4>
<A HREF="../home.htm">return to JavaScript Page</A>
<H5>John Oyston, (oyston@oyston.com), Dec 1998</H5></FONT></CENTER>
</BODY></HTML>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Elegant Menu Mouseover


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek