Announcement

Collapse
No announcement yet.

Re-Sizing Pop Windows To Include Text

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

    Re-Sizing Pop Windows To Include Text

    Hello,

    I'm very new to V8 and actinic in general so i need help in very basic terms.
    I have entered the following code to re size my pop up window but need to alter it to include text

    <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>

    Can anyone tell me what i need to change to include text?

    #2
    Hi Tim

    Please take a look at the following Thread it deals with the same issue.

    Kind Regards
    Kiran Chandran
    Technical Support - SellerDeck
    http://www.sellerdeck.co.uk/

    Further help can also be found at http://community.sellerdeck.com/forumdisplay.php?f=27

    Comment


      #3
      All ready tried that

      Hi,

      This is the original post where i got my code from.

      I have added the iHeight +50
      and
      Name="ExtendedInfoImageHeight"/>\" border=\"0"></a" );

      This didn't work so i added the following info on the same post

      Name="ExtendedInfoImageHeight"/>\" border=\"0"></a"><br><Actinic:Variable Name="ExtendedInfoText"/>" );

      When i did a offline preview i had an error pop up stating Actinic Variable Name not defined.

      Can you please point me in the right direction?

      Comment


        #4
        Hi Tim,

        Name="ExtendedInfoImageHeight"/>\" border=\"0"></a"><br><Actinic:Variable Name="ExtendedInfoText"/>" );
        Your posting looks slightly different to the original post. Remove the " from </a">

        I've quickly tried out from the original post and it seems to work for me.
        ********************
        Tracey
        SellerDeck

        Comment


          #5
          Still Stuck!

          Hi Tracey

          This is what i have changed it to

          height=\"<Actinic:Variable Name="ExtendedInfoImageHeight"/>\" border=\"0\"></a><br>Actinic:Variable Name="ExtendedInfoText"/>" );
          When i do a preview now all i get is blackness any ideas?

          Here my full listing if it helps.

          <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 + 50); 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><br>Actinic:Variable Name="ExtendedInfoText"/>" );
          </script>
          </body>
          </html>
          Thanks for all your current help and i hope you can put me right as to where i'm going wrong

          Comment


            #6
            Hi,

            The black background is coming from:

            Code:
            <body bgcolor="#000000"
            change it to:

            Code:
            <body bgcolor="#ffffff"
            to make it white.

            You also need to change:

            Code:
            <br>Actinic:Variable Name="ExtendedInfoText"/>" );
            to:

            Code:
            <br><Actinic:Variable Name="ExtendedInfoText"/>" );
            ********************
            Tracey
            SellerDeck

            Comment


              #7
              Thanks Tracey

              That seems to have done the trick.
              A couple of quick questions if i may?

              1. I guess you have to increase the iHeight if you have more text in the window?
              2. The font of my text in the pop up window has changed. What control this and how to i change it?

              Thanks very much for all you help. You're a star

              Comment


                #8
                Hi Tim,

                1. I guess you have to increase the iHeight if you have more text in the window?
                I would assume so. It looks like another community member provided this code so I can't really give any advice on it as I'm not an expert in javascript.

                2. The font of my text in the pop up window has changed. What control this and how to i change it?
                You could put the link to the stylesheet in the layout. Something like:

                <link href="actinic.css" rel="stylesheet" type="text/css" />

                should go before the </HEAD> tag. Replace 'actinic.css' with the name of your stylesheet if you are using your own custom stylesheet.
                ********************
                Tracey
                SellerDeck

                Comment


                  #9
                  Hi Tracy

                  All sorted now. Thanks for all your patience and help

                  Comment

                  Working...
                  X