home *** CD-ROM | disk | FTP | other *** search
/ PC User 2005 May / CD / PCU0505CD.iso / software / full / coffecup / files / html2005.exe / %MAINDIR% / Javascript / ImageChangeOnMouseOver.xml < prev    next >
Encoding:
Text File  |  2005-02-16  |  2.7 KB  |  80 lines

  1. <ccResource>
  2.   <ccTitle>
  3. Image Change on MouseOver
  4.   </ccTitle>
  5.   <ccCategory>
  6. Images
  7.   </ccCategory>
  8.   <ccDescription>
  9. This will make new images pop up when the user places the mouse over them.
  10.   </ccDescription>
  11.   <ccInstructions>
  12. Place this script in the HEAD tags of your webpage.  Then place the original images as "1.gif" "2.gif" "3.gif" and so on. Then have the pop-up images as "1b.gif" "2b.gif" "3b.gif" and so on. Be sure to change the hyperlinks to refer to your webpage. We have also provided some test images in the CoffeeCup Software folder. These are "just" for a reference to make this script easier.
  13.   </ccInstructions>
  14.   <ccHeadContent>
  15.   
  16.   </ccHeadContent>
  17.   <ccBodyContent>
  18. <SCRIPT LANGUAGE="JavaScript">
  19.  
  20. //Modified by CoffeeCup Software 
  21. //This code is Copyright (c) 1998 CoffeeCup Software 
  22. //All rights reserved. License is granted to a single user to 
  23. //reuse this code on a personal or business Web Site. 
  24.  
  25.  
  26. <!--
  27.         if(document.images) {
  28.                 ccover = new Array(6);
  29.                 ccout = new Array(6);
  30.                 ccover[1]=new Image;
  31.                 ccout[1]=new Image;
  32.                 for(var n=2;n<=5;n++) {
  33.                         ccover[n]=new Image;
  34.                         ccout[n]=new Image;
  35.                 }
  36.                 for(var n=1;n<=5;n++) {
  37.                         ccover[n].src=""+n+"b.gif";
  38.                         ccout[n].src=""+n+".gif";
  39.                 }
  40.         }
  41.         function ccOn(i) {
  42.                 if(document.images) document.images["cc" + i].src=ccover[i].src;
  43.         }
  44.         function ccOff(i) {
  45.                 if(document.images) document.images["cc" + i].src=ccout[i].src;
  46.         }
  47. //-->
  48.  
  49.  
  50. </SCRIPT>
  51.  
  52. </HEAD>
  53.  
  54.  
  55.         <A HREF="http://www.coffeecup.com/" onMouseOver=ccOn("1") onMouseOut=ccOff("1")><IMG NAME="cc1" SRC="1.gif" BORDER=0 HSPACE=0 VSPACE=0></A><BR>
  56.  
  57.  
  58.         <A HREF="http://www.coffeecup.com/" onMouseOver=ccOn("2") onMouseOut=ccOff("2")><IMG NAME="cc2" SRC="2.gif" BORDER=0 HSPACE=0 VSPACE=0></A><BR>
  59.  
  60.  
  61.         <A HREF="http://www.coffeecup.com/" onMouseOver=ccOn("3") onMouseOut=ccOff("3")><IMG NAME="cc3" SRC="3.gif" BORDER=0 HSPACE=0 VSPACE=0></A><BR>
  62.  
  63.  
  64.         <A HREF="http://www.coffeecup.com/" onMouseOver=ccOn("4") onMouseOut=ccOff("4")><IMG NAME="cc4" SRC="4.gif" BORDER=0 HSPACE=0 VSPACE=0></A><BR>
  65.  
  66.  
  67.         <A HREF="http://www.coffeecup.com/" onMouseOver=ccOn("5") onMouseOut=ccOff("5")><IMG NAME="cc5" SRC="5.gif" BORDER=0 HSPACE=0 VSPACE=0></A><BR>
  68.  
  69. <P>
  70.   </ccBodyContent>
  71.   <ccElementContent>
  72.   
  73.    <ccElementName></ccElementName>
  74.    <ccElementAction></ccElementAction>
  75.    
  76.   </ccElementContent>
  77.   <ccExtraData>
  78.  
  79.   </ccExtraData>
  80. </ccResource>