Copy link to clipboard
Copied
I need to put a client's name and copyright year in the footer such that it will update according to to
day's date. Hence, when we reach 1st Jan 2011, the copyright changes to (c) 2011.
How do I insert it? And is this where we use a Snippet?
(RH8).
Philip
Copy link to clipboard
Copied
Ah - found it -
<p>©
<script type="text/javascript">
var d = new Date();
document.write(d.getFullYear());
</script></p>
On another post. Change PC date to next year and it updates the year of the date viewed.
TTFN
Copy link to clipboard
Copied
Hi Philip
I note that you seem to have found your solution and that's cool.
For the faint of heart when it comes to using JavaScript, RoboHelp actually offers a way to accomplish it right from inside the UI.
For starters, I edited the footer area of a Master Page. In that footer I clicked Insert > Fields and Variables... This presented the Fields and Variables dialog.
From there I clicked New and replaced the default in the Current format field with yyyy.
Cheers... Rick
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7 or 8 moments from now - $24.95! |
Copy link to clipboard
Copied
Hello Rick,
I tried that ... but when I moved the PC date into next year and refreshed the browser, it didn't change the date. It seems to insert the build date.
That's why I used the script - works every time.
Happy Christmas!
Philip