Announcement

Collapse
No announcement yet.

Anyone know how to change the font colour of this?

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

    Anyone know how to change the font colour of this?

    Hi,

    Does anyone know how I can format the font colour of the javascript section?
    Its not something I know much about

    <actinic:variable formatting="bold,font(Color|ffffff)" name="CookieCartItemsLabel" />
    <script language="javascript" type="text/javascript">
    <!--
    document.write(getCartItem(3));
    // -->
    </script>,
    <actinic:variable formatting="font(Color|ffffff)" name="CookieCartValueLabel" />
    <script language="javascript" type="text/javascript">
    <!--
    document.write(getCartItem(1));
    // -->
    </script>



    I realise that the javascript within the getCartItem is :


    function getCartItem(nIndex)
    {
    var act_cart= getCookie("CART_CONTENT")
    var sTemp =(act_cart != null) ? sTemp=act_cart.split("\t"):0;
    return (sTemp.length > 0) ? sTemp[nIndex] : 0;
    }



    I'm just not familiar with javascript
    Is there anything I can add in here to set the font colour?

    cheers

    #2
    Anyone?

    I suspect its an easy one - but Im not that clever when it comes to javascript.

    Comment


      #3
      Use the following code. I have used <span> tags around the scripts stuff to change the colour of the text.
      Code:
      <actinic:variable formatting="bold,font(Color|ffffff)" name="CookieCartItemsLabel" />
      <span style="color: white;">
      <script language="javascript" type="text/javascript">
      <!--
      document.write(getCartItem(3));
      // -->
      </script>
      </span>,
      <actinic:variable formatting="font(Color|ffffff)" name="CookieCartValueLabel" />
      <span style="color: white;">
      <script language="javascript" type="text/javascript">
      <!--
      document.write(getCartItem(1));
      // -->
      </script>
      </span>

      Comment

      Working...
      X