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:
- Click in the MasterBorder area or press F11 to bring up the MasterBorder Properties palette
- Press the HTML button to show the HTML insertion points
- 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:
- In the MasterBorder insert tab named Inside Body Tag insert:
onLoad='javascript:write_copyright()'
Step 3:
- Double click in your bottom MasterBorder within a table cell or text box to get enter edit mode
- Press CTRL+T and write this block of code in the HTML insertion box:
- 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
Did you find this tutorial useful? Do you want to keep this resource online? Make a donation to keep gotFusion alive
This page was written by and is maintained by turtle
|
|