Welcome to TalkGraphics.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2015
    Location
    Petrolia, Ontario, Canada
    Posts
    70

    Default Change color of javascript text in placeholder

    I'd like to implement an automatic copyright date change in my page footer. I drew a placeholder square and I'm using the following javascript snippet to replace the HTML Code (Body) to do so:

    &copy; 2006<script>new Date().getFullYear()>2006&&document.write("-"+new Date().getFullYear());</script>, My Company.

    My footer is black, so I'd like to change the color of the output text to white. I do have a style assigned for footer text that is white, but I don'[t know how to assign this style to the javascript text. I'm not a javascript expert so any help will be appreciated. Thanks.

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,834

    Default Re: Change color of javascript text in placeholder

    You can use:
    Code:
    <span style="color:white;">&copy; 2006<script>new Date().getFullYear()>2006&&document.write("-"+new Date().getFullYear());</script>, My Company.</span>
    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  3. #3
    Join Date
    Apr 2015
    Location
    Petrolia, Ontario, Canada
    Posts
    70

    Default Re: Change color of javascript text in placeholder

    Thanks Acorn. I should have known that. You've shown me the way. Now I can similarly modify font, size to match my desired style. Happy New Year.

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,834

    Default Re: Change color of javascript text in placeholder

    Happy New Year as it wraps its way around the world,
    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  5. #5
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,834

    Default Re: Change color of javascript text in placeholder

    If you create a text box with "© 2006, My Company." and to that add a Placeholder body of your original code then you can change the boilerplate text font and style within Xara.

    The trick is just to replace the rectangle with a text box.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •