Announcement

Collapse
No announcement yet.

Pop-Up Window Automatically Resizing To Fit The Image Within It - Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Pop-Up Window Automatically Resizing To Fit The Image Within It - Problem

    Hi,

    I decided to use the code on page 31 of the Advanced User Guide to ensure that my pop-up windows automatically resize to fit the images within them. I have followed the instructions correctly.

    Now, when I click on a product to view the enlarged image within the pop-up window, I can see that the window has resized (compared to what it was like before). However, the problem is that the window has a black background and the image can't be seen anymore!

    I am assuming that somewhere the background colour has changed, but within the 'layout code' this is set to "#000000" which I am assuming is white.

    Could anyone help please?
    Jules

    #2
    #000000 is black

    Comment


      #3
      Thanks Lee,

      So it is! My brain is sozzled from trying to get my head around Actinic! Ok, so I've changed the background to white (#FFFFFF). However, the problem is still there. I have a white background but my image has disappeared. Any ideas?

      Thanks,
      Jules

      Comment


        #4
        I would need to have a url or the code to see it myself.

        Comment


          #5
          Hi Lee,

          I haven't uploaded it yet so no URL. This is the code lifted straight from the AUG:

          <html>
          <head>
          <Actinic:WINDOW width="<Actinic:Variable Name="ExtendedInfoImageWidth"/>" height="<Actinic:Variable Name="ExtendedInfoImageHeight"/>"/>
          <title><actinic:variable name="PageTitle" /></title>
          <actinic:variable name="BaseHref" />
          <script language='javascript'>
          var arrTemp=self.location.href.split("?");
          var picUrl = (arrTemp.length>0)?arrTemp[1]:"";
          var NS = (navigator.appName=="Netscape")?true:false;

          function FitPic() {
          iWidth = (NS)?window.innerWidth:document.body.clientWidth;
          iHeight = (NS)?window.innerHeight:document.body.clientHeight;
          iWidth = document.images[0].width - iWidth;
          iHeight = document.images[0].height - iHeight;
          window.resizeBy(iWidth, iHeight); self.focus(); };
          </script>
          </head>
          <body bgcolor="#000000" onload='FitPic();' topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">
          <script language='javascript'>
          document.write( "<a href=\"javascript:window.close();\"><img src=\"<Actinic:Variable Name="ExtendedInfoImage"/>\" width=\"<Actinic:Variable Name="ExtendedInfoImageWidth"/>\" height=\"<Actinic:Variable Name="ExtendedInfoImageHeight"/>\" border=\"0\"></a>" );
          </script>
          </body>
          </html>


          I amended the background colour as I said, but the image is still not showing.
          Jules

          Comment


            #6
            Jules its no good lifting the code from the AUG, which we know works and is correct. It's the code on your site that is the issue. For it not to be working i am presuming you have done something wrong. Without seeing what you have done, it's impossible to say.

            Comment


              #7
              Lee,

              Ok. Thanks for your time. No problem. I'll submit a query into the support desk and see what they come up with.

              Regards,
              Jules

              Comment


                #8
                They'll ask for the same! Good luck...

                Comment

                Working...
                X