Editing .js Javascript files for Allwebco templates
You can add new items to template .js files. Some files you can edit are the menu.js, header.js, sidebar.js or footer-copyright.js. Edit these files using a plain text editor like Notepad in Windows or TextEdit on Mac.
In the above example notice how this code is breaking into two lines. When you paste it into your .js file make sure this is all on one line. If you need to, turn off "word wrap" under "Format" in Notepad or your text editor.
Option: Once you add the above code to a .js file, you can then optionally float and locate this item anywhere on the webpage. See: using a DIV to place an item.
Adding a Javascript
You can add a Javascript to any template .js file, however, in this case do not add the following code from your script. Remove the script start tag:
<script type="text/javascript"><!--
...and remove the script ending tag code...
//-->
</script>
Adding Google Analytics
You can add Google Analytics code to a .js file. This allows you to add Analytics globally to every page in your website. See: Google Analytics support.
Adding Google Ads or other items with .js file calls
Some code or ads you will want to add may include other .js code. In other words you will be adding a .js file inside a .js file. Below is an example of how to add a .js file call inside a .js file.
The above is a complex edit. You will want to take care and be sure to do this edit carefully. Any single error and this may not work. See also: adding Google ads.
EXAMPLE: Add a Google search box
Perhaps you would like to add a Google search to the sidebar.js that looks like this:
Google Search
Copy the following code and paste this into a .js file:
Once you add the above code to a .js file, you can then optionally float and locate this item anywhere on the webpage. See: using a DIV to place an item.
Google search box in an HTML page
The following code is the same Google search box as the above example but it is instead added to an HTML webpage and not a .js file.