GotFusion.com Where your journey begins
Full Service Web HostingNetObjects Fusion 7 Websites Portal

 


 

Creating a JavaScript function that will automatically place a copyright date on your pages that will never need to be updated.

This neat little JavaScript function will take the current year and add it to a copyright line that you can place on every page of your web site projects using the MasterBorder html insertion

This is a 3 step process

Step 1:
  1. Click in the MasterBorder area or press F11 to bring up the MasterBorder Properties palette
  2. Press the HTML button to show the HTML insertion points
  3. Paste the following JavaScript function in the Between the Head Tags tab.
    Download a zipped text file of this javascript function

Find the section of the script function that says:
Copyright © ' + newYear +' gotFusion LLC

Change the name gotFusion LLC to the name you wish to appear on the copyright notice.

Step 2:
  1. In the MasterBorder insert tab named Inside Body Tag insert:
    onLoad='javascript:write_copyright()'
Step 3:
  1. Double click in your bottom MasterBorder within a table cell or text box to get enter edit mode
  2. Press CTRL+T and write this block of code in the HTML insertion box:
    Type in this div tag. You can leave the text empty if you wish as only the div tag makes the javascript show
  3. If you wish the text to be centered click the centering icon on the Text or Cell Properties palette

When the year changes this script will automaticly place the current year on your pages without you having to worry about it ever again



Return to the TOP of this page

Did you find this tutorial useful?
Do you want to keep this resource online?
Make a donation to keep gotFusion alive


|  Fusion  |  Web Design  |  Hosting  |  Resources  |  gotFusion Store  | 

Problems with this page?  

All content copyright © 2001 - 2017 gotFusion LLC. The name gotFusion and the gotFusion ® logo are registered trademarks of gotFusion LLC
Copyright, legal notice & privacy statement