Announcement

Collapse
No announcement yet.

Stubborn Code

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

    Stubborn Code

    This is a bit of a strange one. I've created a table containing three cells to display "Quantity" "Price" and "Add to Cart" The code is as follows:

    <table border="1" width="100"%>
    <tr>
    <td align="center"> NETQUOTEVAR:CARTERRORXMLNETQUOTEVAR:PRODUCTQUANTITY </td>
    <td align="center"> NETQUOTEVAR:PRODUCTPRICE </td>
    <td align="center"> <Actinic:ACTIONS>NETQUOTEVAR:ADDTOCARTBUTTON</Actinic:ACTIONS>
    NETQUOTEVAR:TEMPLATEENDXML
    </td>
    </tr>
    </table>

    For some reason the "Quantity" field or "QTY" as I've renamed it stays glued to the bottom of the cell. The other two fields reposition using Valign="top" Valign="Middle" etc., But the QTY field will not obey this command. It should position to the middle by default, but for some strange reason it hasn't.

    Does anyone have any ideas as to what is happening here?

    Thanks,

    Myles Sinclair
    www.magicalwonders.com

    #2
    Look at the source of your generated page and see if there's a <BR> in that cell messing things up.

    Or post an URL so we can see.

    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman,

      I've posted the site at the following URL:

      http://trials.actinic.com/trials/tri...xclusives.html

      I hope it's easy to revert back from test mode!

      You are absolutely right, a <br> is being created before the quantity for some reason. Not sure why this is and have no clue how I stop this being created.

      Also I've just noticed that my Price info appears to be Aligned "Right" Not sure why as I haven't specified it. But then again I didn't specify the <br> in Quantity field either!

      Hope you can help.

      Many thanks

      Myles
      Last edited by magicalwonders; 17-Oct-2004, 11:09 AM. Reason: Added info
      www.magicalwonders.com

      Comment


        #4
        I can assist with this one.

        In 'Design | Text' use the 'Go to' button to go to Phase: -1 ID: 2173. It looks like:

        %s<INPUT TYPE=text NAME="%s" SIZE="4" VALUE="%d">

        Change it to

        <!-- %s --> Quantity: <INPUT TYPE=text NAME="%s" SIZE="4" VALUE="%d">

        Comment


          #5
          Thanks Chris,

          This code seems to have sorted the positioning problem, however I now seem unable to rename this field!

          I've tried to rename to "Qty" so as to get both the word and the box on the same line. I've edited ID: 159 and ID:166 about three or four times to no avail.

          Also the text for this item has changed to black whereas it was prevoiusly red.

          Any idea what's gone wrong?

          Myles
          www.magicalwonders.com

          Comment


            #6
            O.K. I've figured out how to change the word to "Qty", by changing it on the line at ID: 2173.

            To change it back to colour Red I'm guessing I apply inline style, color="red" or something like that? Am I right?

            Many thanks

            Myles
            www.magicalwonders.com

            Comment


              #7
              <!-- %s --> <font color="red">Quantity:</font> <INPUT TYPE=text NAME="%s" SIZE="4" VALUE="%d">

              Is one way to do it.

              Norman
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Thanks Norman,

                Much appreciated.

                Myles
                www.magicalwonders.com

                Comment


                  #9
                  The problem returns!

                  I have had to reinstall a previous backup of my site that was prior to fixing a problem positioning the word "Qty" within a cell.

                  I have edited the line ID 2173 using Chris' code. This worked the first time, but now it appears to have no affect.

                  This is the code I'm using which also includes a fix from Norman to adjust the size of the box:

                  <!-- %s --><font color="red"> Qty <INPUT TYPE=text NAME="%s" style="width: 25px" VALUE="%d">

                  I've refreshed the website which is currently under test at this address.

                  http://support.actinic.co.uk/~kcsupport/test/index.html

                  For some reason a <br> is once again being created before the "Quantity" field, forcing the word to appear on the bottom line.

                  Anyone got a clue why this is happening?

                  Myles Sinclair
                  www.magicalwonders.com

                  Comment


                    #10
                    THIS PAGE looks fine to me - there is no <br> before the Qty

                    Comment


                      #11
                      Chris,

                      This is the line I am looking at.

                      </table> <table border="1" width="100"%><tr><td align="center"> <Actinic:CartError ProdRef="22"/> <!-- <SPAN CLASS="actrequiredcolor"><BR>Quantity:</SPAN> --><font color="red"> Qty <INPUT TYPE=text NAME="Q_22" style="width: 25px" VALUE="1"> </td><td align="center"> <Actinic:PRICES PROD_REF="22"

                      There is a <br> being produced before the word "Quantity".

                      Help!

                      Myles
                      www.magicalwonders.com

                      Comment


                        #12
                        The <BR> is within comment marks...

                        <!-- <SPAN CLASS="actrequiredcolor"><BR>Quantity:</SPAN> -->

                        The code you are seeing is the <!-- %s --> from Design | Text

                        Comment


                          #13
                          Thanks Chris,

                          I see what you mean, it's just that the word "QTY" is a bit lower on the page compared to the position of the "price" in the next cell. When I comment out the box, the "Qty" moves up slightly in line with the price.

                          The box must be impacting on the positioning of "Qty" somehow.

                          Is there any way I can force the "Qty" to line up with the "Price"?

                          Thanks,

                          Myles
                          www.magicalwonders.com

                          Comment


                            #14
                            I think I've solved this problem. The box for numerical input definitely has an affect on the positioning of the word "quantity".

                            After reducing the height of the box to 19 pixels the word "Quantity" now positions nicely in the middle of the cell.

                            I have not specified a height for the cell containing this field, so I would have expected the cell to stretch to accomodate the box. I'm not sure why reducing the height of the box itself has an effect on the word along side it.

                            Anyone know why this relationship exists?

                            Just curious. Don't like mysteries. (except Midsomer Murders!)

                            Myles
                            www.magicalwonders.com

                            Comment

                            Working...
                            X