html >> swapped images overlap on each other

by miss_pommes » Fri, 06 Jan 2006 07:47:00 GMT

I created a series of swaped-images and I would like all of them to appear on
the same area within the page, kind of overlaping each other. I keep getting
the 2nd, 3rd, etc. swapped images under the first one, creating a really big
ugly page. Please help...



Similar Threads

1. Help using swap images to swap 2 separate images

:frown;
 I am trying to use swap images to swap two separate images on the same page 
but I can't get it to work. Here is the code for one image, rotator. I also 
have a second image,rotatorB that I want to swap different images with. I think 
I need two separate codes but do not know how to do it.
 Thank You

 <script type="text/javascript">
 <!--
 function MM_reloadPage(init) {  //reloads the window if Nav4 resized
   if (init==true) with (navigator) {if 
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
     document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; 
onresize=MM_reloadPage; }}
   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) 
location.reload();
 }
 MM_reloadPage(true);

 function MM_preloadImages() { //v3.0
   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; 
i++)
     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
 }

 function MM_swapImgRestore() { //v3.0
   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) 
x.src=x.oSrc;
 }

 function MM_findObj(n, d) { //v4.01
   var p,i,x;  if(!d) d=document; 
if((p=n.indexOf("?"))>0&&parent.frames.length) {
     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) 
x=d.forms[i][n];
   for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
x=MM_findObj(n,d.layers[i].document);
   if(!x && d.getElementById) x=d.getElementById(n); return x;
 }

 function MM_swapImage() { //v3.0
   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; 
for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) 
x.oSrc=x.src; x.src=a[i+2];}
 }
 // Comma separated list of images to rotate 
 var imgs = new 
Array('product_images/conversion_images/1.jpg','product_images/conversion_images
/2.jpg','product_images/conversion_images/3.jpg','product_images/conversion_imag
es/4.jpg','product_images/conversion_images/5.jpg','product_images/conversion_im
ages/6.jpg','product_images/conversion_images/7.jpg','product_images/conversion_
images/8.jpg','product_images/conversion_images/9.jpg','product_images/conversio
n_images/10.jpg','product_images/conversion_images/11.jpg', 
'product_images/conversion_images/12.jpg','product_images/conversion_images/13.j
pg','product_images/conversion_images/14.jpg','product_images/conversion_images/
15.jpg','product_images/conversion_images/16.jpg','product_images/conversion_ima
ges/17.jpg','product_images/conversion_images/18.jpg','product_images/conversion
_images/19.jpg','product_images/conversion_images/20.jpg', 
'product_images/conversion_images/21.jpg','product_images/conversion_images/22.j
pg','product_images/conversion_images/23.jpg','product_images/conversion_images/
24.jpg','product_images/conversion_images/25.jpg');
 // delay in milliseconds between image swaps 1000 = 1 second 
 var delay = 2000;
 var counter = 0;

 function preloadImgs(){
   for(var i=0;i<imgs.length;i++){
     MM_preloadImages(imgs[i]);
   }

 //-->
 </script>
 </head>
 <body onload="preloadImgs();randomImages();">

 <table width="812" border="0" cellpadding="0" cellspacing="0">
   <!--DWLayoutTable-->
   <tr>
     <td height="167" colspan="11" valign="top"><table width="100%" border="0" 
cellpadding="0" cellspacing="0">
       <!--DWLayoutTable-->
       <tr>
         <td width="802" height="167" valign="top"><img 
src="product_images/homepage_08/header_08and_redLine_toolba.jpg" alt="Pearl 
Technologies, Inc." width="802" height="165" id="Image1" /></td>
         </tr>
       
     </table></td>
   <td width="4"> </td>
   <td width="6"> </td>
   </tr>
   <tr>
     <td width="73" height="37"> </td>
     <td width="89"> </td>
     <td width="111"> </td>
     <td width="49"> </td>
     <td width="45"> </td>
     <td width="95"> </td>
     <td width="60"> </td>
     <td width="50"> </td>
     <td width="88"> </td>
     <td width="112"> </td>
     <td width="30"> </td>
     <td> </td>
     <td> </td>
   </tr>
   
   
   <tr>
     <td height="179"> </td>
     <td> </td>
     <td colspan="3" valign="top"><table width="100%" border="0" 
cellpadding="0" cellspacing="0">
       <!--DWLayoutTable-->
       <tr>
         <td width="193" height="175" valign="top"><a 
href="store06de.html"><img 
src="product_images/homepage_08/convimagehomepageopt_08.jpg" name="rotator" 
width="193" height="175" id="rotator" /></a></td>
         </tr>
       <!--DWLayoutTable-->
       
     </table></td>
     <td> </td>
     <td colspan="3" valign="top"><table width="100%" border="0" 
cellpadding="0" cellspacing="0">
       <!--DWLayoutTable-->
       <tr>
         <td width="193" height="175" valign="top"><a 
href="extrusionpage.html"><img 
src="product_images/homepage_08/extimagehomepageopt_08.jpg" alt="Extrusion 
Products" name="rotatorB" width="193" height="175" border="0" id="rotatorB" 
/></a></td>
       </tr>
     </table>    </td><script type="text/javascript">
 <!--
 function MM_reloadPage(init) {  //reloads the window if Nav4 resized
   if (init==true) with (navigator) {if 
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
     document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; 
onresize=MM_reloadPage; }}
   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) 
location.reload();
 }
 MM_reloadPage(true);

 function MM_preloadImages() { //v3.0
   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; 
i++)
     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
 }

 function MM_swapImgRestore() { //v3.0
   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) 
x.src=x.oSrc;
 }

 function MM_findObj(n, d) { //v4.01
   var p,i,x;  if(!d) d=document; 
if((p=n.indexOf("?"))>0&&parent.frames.length) {
     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) 
x=d.forms[i][n];
   for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
x=MM_findObj(n,d.layers[i].document);
   if(!x && d.getElementById) x=d.getElementById(n); return x;
 }

 function MM_swapImage() { //v3.0
   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; 
for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) 
x.oSrc=x.src; x.src=a[i+2];}
 }
 // Comma separated list of images to rotate 
 var imgs = new 
Array('product_images/conversion_images/1.jpg','product_images/conversion_images
/2.jpg','product_images/conversion_images/3.jpg','product_images/conversion_imag
es/4.jpg','product_images/conversion_images/5.jpg','product_images/conversion_im
ages/6.jpg','product_images/conversion_images/7.jpg','product_images/conversion_
images/8.jpg','product_images/conversion_images/9.jpg','product_images/conversio
n_images/10.jpg','product_images/conversion_images/11.jpg', 
'product_images/conversion_images/12.jpg','product_images/conversion_images/13.j
pg','product_images/conversion_images/14.jpg','product_images/conversion_images/
15.jpg','product_images/conversion_images/16.jpg','product_images/conversion_ima
ges/17.jpg','product_images/conversion_images/18.jpg','product_images/conversion
_images/19.jpg','product_images/conversion_images/20.jpg', 
'product_images/conversion_images/21.jpg','product_images/conversion_images/22.j
pg','product_images/conversion_images/23.jpg','product_images/conversion_images/
24.jpg','product_images/conversion_images/25.jpg');
 // delay in milliseconds between image swaps 1000 = 1 second 
 var delay = 2000;
 var counter = 0;

 function preloadImgs(){
   for(var i=0;i<imgs.length;i++){
     MM_preloadImages(imgs[i]);
   }

 //-->
 </script>
 </head>
 <body onload="preloadImgs();randomImages();">

 <table width="812" border="0" cellpadding="0" cellspacing="0">
   <!--DWLayoutTable-->
   <tr>
     <td height="167" colspan="11" valign="top"><table width="100%" border="0" 
cellpadding="0" cellspacing="0">
       <!--DWLayoutTable-->
       <tr>
         <td width="802" height="167" valign="top"><img 
src="product_images/homepage_08/header_08and_redLine_toolba.jpg" alt="Pearl 
Technologies, Inc." width="802" height="165" id="Image1" /></td>
         </tr>
       
     </table></td>
   <td width="4"> </td>
   <td width="6"> </td>
   </tr>
   <tr>
     <td width="73" height="37"> </td>
     <td width="89"> </td>
     <td width="111"> </td>
     <td width="49"> </td>
     <td width="45"> </td>
     <td width="95"> </td>
     <td width="60"> </td>
     <td width="50"> </td>
     <td width="88"> </td>
     <td width="112"> </td>
     <td width="30"> </td>
     <td> </td>
     <td> </td>
   </tr>
   
   
   <tr>
     <td height="179"> </td>
     <td> </td>
     <td colspan="3" valign="top"><table width="100%" border="0" 
cellpadding="0" cellspacing="0">
       <!--DWLayoutTable-->
       <tr>
         <td width="193" height="175" valign="top"><a 
href="store06de.html"><img 
src="product_images/homepage_08/convimagehomepageopt_08.jpg" name="rotator" 
width="193" height="175" id="rotator" /></a></td>
         </tr>
       <!--DWLayoutTable-->
       
     </table></td>
     <td> </td>
     <td colspan="3" valign="top"><table width="100%" border="0" 
cellpadding="0" cellspacing="0">
       <!--DWLayoutTable-->
       <tr>
         <td width="193" height="175" valign="top"><a 
href="extrusionpage.html"><img 
src="product_images/homepage_08/extimagehomepageopt_08.jpg" alt="Extrusion 
Products" name="rotatorB" width="193" height="175" border="0" id="rotatorB" 
/></a></td>
       </tr>
     </table>    </td>

2. Multiple Swapped Images Using One Swap Image - Adobe Dreamweaver

3. Swap Image and Swap Image Restore behaviors

Hi,

I have four small images and a big one:

<p><img src="222209.jpg" name="bigphoto" width="320" height="195" 
id="bigphoto" /></p>
<p>
<img src="222012.jpg" name="photo1" width="77" height="74" id="photo1" />
<img src="222095.jpg" name="photo2" width="77" height="74" id="photo2" />
<img src="222125.jpg" name="photo3" width="77" height="74" id="photo3" />
<img src="222171.jpg" name="photo4" width="77" height="74" id="photo4" />
</p>

Whenever the mouse is over one of the small images that image should change
- a classic image rollover. I can do that with the Swap Image behavior.
But then I want to be able to click on the small image and change the big 
one,
while keeping the image rollover. If I try to use a Swap Image behavior
associated with the onlick event, when the mouse moves out of the small 
image
the big image gets restored, because there is a Swap Image Restore behavior
associated with the small image (from the image rollover)

I know how to do this using code, but I can't do it using only Dreamweaver
Behaviors. Is there a way?

Best regards

Paulo Almeida 


4. Swap image and swap image restore fail in Safari - Adobe Dreamweaver

5. swap image AND swap link (of the said image when clicked on)

Hi all

situation:

a list of text links, and a thumbnail next to it.
When you mouse Over each link, the thumbnail swaps to another image. 
There is no onRollOut function, so the thumbnail stays where it is as 
long as you don't mouse over another link.

Now, what if I want the thumbnail to link to the appropriate page if 
clicked (i.e. to link to a different page according to what link was 
moused over last?)

How would I do that?

Thanks for your help.

6. Swap Image behavior in a swapped image - Adobe Dreamweaver

7. Swap image effect on a swap image

Hi, i've created a list of buttons with a mouseover on all of them, which 
triggers a different picture in the same spot for each one. These pictures have 
no Mouseout, so the picture remains till you mouseover another button. My 
question is, how do I add another swap image to the swap image that is 
triggered by the buttons. For some reason, you can create these in Fireworks, 
but it makes it into an htm format, I just want .gif format, which still gets 
triggered. Thanks very much!

8. Swap Image Restore n/a with multipe swapped image - Adobe Dreamweaver