4 Replies Latest reply on Sep 4, 2007 9:03 PM by GhengisJones

    Swap Image Misbehavior

    GhengisJones Level 1
      Hi

      I have some thumbnail images that, when you mouseover them, use the Swap Image Behavior to swap the picture in a bigger image (called ImgWindow). All of the pictures are pulled from a database record. All of the images are enclosed in a table.

      When I applied Repeat Region to the table, everything still displays just fine, but the mouseover Swap Image no longer works (in IE7 anyway).

      Is this inevitable, or is there a work around?

      I suspect it has something to do with Repeat Region creating multiple instances of "ImgWindow."

      See the page at: http://www.dallasmodelworks.com/gallery/gallery_mount_penelope.asp

      (Don't click on the thumbnails, though, or you'll have to wait for a huge hi-rez file to open.)

      Thanks

      Craig
        • 1. Re: Swap Image Misbehavior
          Level 7
          > Is this inevitable, or is there a work around?

          No - it's most likely operator error.

          > I suspect it has something to do with Repeat Region creating multiple
          > instances of "ImgWindow."

          Is ImgWindow within the repeat region? It shouldn't be.

          If you want that to be the case, then you'll have to use the index of the
          repeat region to explicitly name each ImgWindow with a numeric suffix for
          each pass through the repeat, e.g.,

          ImgWindow1, ImgWindow2, etc.

          and then you would make the same modification to the swap image call so that
          the correct repeat region is called.

          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.dreamweavermx-templates.com - Template Triage!
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
          ==================


          "GhengisJones" <webforumsuser@macromedia.com> wrote in message
          news:fbfn8a$pn5$1@forums.macromedia.com...
          > Hi
          >
          > I have some thumbnail images that, when you mouseover them, use the Swap
          > Image
          > Behavior to swap the picture in a bigger image (called ImgWindow). All of
          > the
          > pictures are pulled from a database record. All of the images are enclosed
          > in a
          > table.
          >
          > When I applied Repeat Region to the table, everything still displays just
          > fine, but the mouseover Swap Image no longer works (in IE7 anyway).
          >
          > Is this inevitable, or is there a work around?
          >
          > I suspect it has something to do with Repeat Region creating multiple
          > instances of "ImgWindow."
          >
          > See the page at:
          > http://www.dallasmodelworks.com/gallery/gallery_mount_penelope.asp
          >
          > (Don't click on the thumbnails, though, or you'll have to wait for a huge
          > hi-rez file to open.)
          >
          > Thanks
          >
          > Craig
          >


          • 2. Re: Swap Image Misbehavior
            GhengisJones Level 1
            quote:

            Originally posted by: Newsgroup User

            > I suspect it has something to do with Repeat Region creating multiple
            > instances of "ImgWindow."

            Is ImgWindow within the repeat region? It shouldn't be.

            If you want that to be the case, then you'll have to use the index of the
            repeat region to explicitly name each ImgWindow with a numeric suffix for
            each pass through the repeat, e.g.,

            ImgWindow1, ImgWindow2, etc.

            and then you would make the same modification to the swap image call so that
            the correct repeat region is called.

            --



            Murray,

            Yes, ImgWindow is within the Repeat Region. I would prefer it stay that way.

            How exactly do I address your suggestion?

            The code from the Repeat Region is below...

            thanks,

            Craig

            <%
            While ((Repeat1__numRows <> 0) AND (NOT rsGallery.EOF))
            %>
            <table width="100%" border="0" cellpadding="2" cellspacing="0" id="tblAlbum">
            <tr>
            <td align="left" valign="top" class="redsubhead12"><%=(rsGallery.Fields.Item("Location1").Value)%> </td>
            <td align="right" valign="top" class="bluesubhead12"><%= DoDateTime((rsGallery.Fields.Item("Date1").Value), 2, -1) %><%=(rsGallery.Fields.Item("DateTween").Value)%><%= DoDateTime((rsGallery.Fields.Item("Date2").Value), 2, -1) %></td>
            </tr>
            <tr>
            <td colspan="2" align="left" valign="top" class="bluesubhead12"><span class="redsubhead12"><%=(rsGallery.Fields.Item("Location2").Value)%></span></td>
            </tr>
            <tr>
            <td colspan="2" align="left" valign="top" class="bluesubhead12"><%=(rsGallery.Fields.Item("Title").Value)%><br /></td>
            </tr>
            <tr>
            <td colspan="2" align="left" valign="top"><%=(rsGallery.Fields.Item("Description").Value)%><br /></td>
            </tr>
            <tr>
            <td align="left" valign="bottom"><img src="<%=(rsGallery.Fields.Item("Image1Window").Value)%>" name="ImgWindow" id="ImgWindow" /></td>
            <td align="right" valign="bottom"><img src="<%=(rsGallery.Fields.Item("Image1Thumb").Value)%>" name="ImgThmb1" width="50" id="ImgThmb1" onclick="MM_openBrWindow('<%=(rsGallery.Fields.Item("Image1Hi").Value)%>','HiResImage','s crollbars=yes,resizable=yes,width=700,height=600')" onmouseover="MM_swapImage('ImgWindow','','<%=(rsGallery.Fields.Item("Image1Window").Value )%>',1)" /><img src="<%=(rsGallery.Fields.Item("Image2Thumb").Value)%>" name="ImgThmb2" width="50" id="ImgThmb2" onclick="MM_openBrWindow('<%=(rsGallery.Fields.Item("Image2Hi").Value)%>','HiResImage','s crollbars=yes,resizable=yes,width=700,height=600')" onmouseover="MM_swapImage('ImgWindow','','<%=(rsGallery.Fields.Item("Image2Window").Value )%>','ImgThmb2','','<%=(rsGallery.Fields.Item("Image2Window").Value)%>',1)" /><img src="<%=(rsGallery.Fields.Item("Image3Thumb").Value)%>" name="ImgThmb3" width="50" id="ImgThmb3" onclick="MM_openBrWindow('<%=(rsGallery.Fields.Item("Image3Hi").Value)%>','HiResImage','s crollbars=yes,resizable=yes,width=700,height=600')" onmouseover="MM_swapImage('ImgWindow','','<%=(rsGallery.Fields.Item("Image3Window").Value )%>',1)" /><img src="<%=(rsGallery.Fields.Item("Image4Thumb").Value)%>" name="ImgThmb4" width="50" id="ImgThmb4" onclick="MM_openBrWindow('<%=(rsGallery.Fields.Item("Image4Hi").Value)%>','HiResImage','s crollbars=yes,resizable=yes,width=700,height=600')" onmouseover="MM_swapImage('ImgWindow','','<%=(rsGallery.Fields.Item("Image4Window").Value )%>',1)" /><img src="<%=(rsGallery.Fields.Item("Image5Thumb").Value)%>" name="ImgThmb5" width="50" id="ImgThmb5" onclick="MM_openBrWindow('<%=(rsGallery.Fields.Item("Image5Hi").Value)%>','HiResImage','s crollbars=yes,resizable=yes,width=700,height=600')" onmouseover="MM_swapImage('ImgWindow','','<%=(rsGallery.Fields.Item("Image5Window").Value )%>',1)" /><br />
            <img src="<%=(rsGallery.Fields.Item("Image6Thumb").Value)%>" name="ImgThmb6" width="50" id="ImgThmb6" onclick="MM_openBrWindow('<%=(rsGallery.Fields.Item("Image6Hi").Value)%>','HiResImage','s crollbars=yes,resizable=yes,width=700,height=600')" onmouseover="MM_swapImage('ImgWindow','','<%=(rsGallery.Fields.Item("Image6Window").Value )%>',1)" /><img src="<%=(rsGallery.Fields.Item("Image7Thumb").Value)%>" name="ImgThmb7" width="50" id="ImgThmb7" onclick="MM_openBrWindow('<%=(rsGallery.Fields.Item("Image7Hi").Value)%>','HiResImage','s crollbars=yes,resizable=yes,width=700,height=600')" onmouseover="MM_swapImage('ImgWindow','','<%=(rsGallery.Fields.Item("Image7Window").Value )%>',1)" /><img src="<%=(rsGallery.Fields.Item("Image8Thumb").Value)%>" name="ImgThmb8" width="50" id="ImgThmb8" onclick="MM_openBrWindow('<%=(rsGallery.Fields.Item("Image8Hi").Value)%>','HiResImage','s crollbars=yes,resizable=yes,width=700,height=600')" onmouseover="MM_swapImage('ImgWindow','','<%=(rsGallery.Fields.Item("Image8Window").Value )%>',1)" /><img src="<%=(rsGallery.Fields.Item("Image9Thumb").Value)%>" name="ImgThmb9" width="50" id="ImgThmb9" onclick="MM_openBrWindow('<%=(rsGallery.Fields.Item("Image9Hi").Value)%>','HiResImage','s crollbars=yes,resizable=yes,width=700,height=600')" onmouseover="MM_swapImage('ImgWindow','','<%=(rsGallery.Fields.Item("Image9Window").Value )%>',1)" /><img src="<%=(rsGallery.Fields.Item("Image10Thumb").Value)%>" name="ImgThmb10" width="50" id="ImgThmb10" onclick="MM_openBrWindow('<%=(rsGallery.Fields.Item("Image10Hi").Value)%>','HiResImage',' scrollbars=yes,resizable=yes,width=700,height=600')" onmouseover="MM_swapImage('ImgWindow','','<%=(rsGallery.Fields.Item("Image10Window").Valu e)%>',1)" /></td>
            </tr>
            <tr>
            <td colspan="2" align="center" valign="middle"><hr class="HorizRule" /></td>
            </tr>
            </table>
            <%
            Repeat1__index=Repeat1__index+1
            Repeat1__numRows=Repeat1__numRows-1
            rsGallery.MoveNext()
            Wend
            %>
            • 3. Re: Swap Image Misbehavior
              GhengisJones Level 1
              Murray said:
              "If you want that to be the case, then you'll have to use the index of the
              repeat region to explicitly name each ImgWindow with a numeric suffix for
              each pass through the repeat, e.g.,

              ImgWindow1, ImgWindow2, etc.

              and then you would make the same modification to the swap image call so that
              the correct repeat region is called."

              Would this be correct?

              Repeat1__ImgWindow=Repeat1__ImgWindow+1

              At least for ImgWindow .. . what about the swap images?
              • 4. Re: Swap Image Misbehavior
                GhengisJones Level 1
                Doesn't anybody know the answer to this?