Opening and Editing .js Files
Editing .js files
.js files are plain text and can be edited using Notepad, TextEdit, or any plain text editor. Some HTML editing software can also edit .js files. You should make a backup of the first .js file you edit and test your editor with a save to see that it will work with .js files.
Editing .js file variables
Open your "sidebar.js", "header.js" or other .js file in a plain text editor like Notepad. Click on the visual below to see what areas to edit (See also: editing .js file variables
You may want to make a backup copy of the .js files before you start editing. In all .js files the yes/no options should be all lower case.
Your template may include a script protected email link.
This type of script helps hide the email from spam harvesting if the email link is placed directly into an HTML page. In Allwebco templates this script is used in the sidebar area, and only if the template does not include a "contact.js" or "phone.js". See your template help.html
to see if you have this type of code. Click the visual below.
Error opening .js files
When you double click the .js file and get some type of error or it will open in the wrong application. This means that the .js files are associated with another application. Here are three options to open and edit .js files in Notepad, TextEdit or a plain text editor.
Editing the Menu
- Open Notepad or TextEdit, open the template folder, then drag the .js file into Notepad or TextEdit and drop it.
- Open Notepad or TextEdit, select "file" then "open", browse to the template folder, select "all file types" and open the .js file that way.
- Windows Only: You can change the file associations so when you double click a .js file it will open in Notepad: Open "My computer" choose "tools" or "options" then choose "folder options" choose the "file types" tab. Find "JS" on the list and change the opening application to use Notepad.exe in the Windows folder. Changing this association should cause no problems on your computer.
- Mac Only: You will change the application in which a .js document opens. In Finder, select the .js file, like "menu.js", the choose "File" > "Get Info". In the Info window, click the disclosure triangle next to "Open With", and select the TextEdit application to open the document from the "Open With" pop-up menu. If you want all .js documents to open with the same application, click "Change All".
- See also: editing .js files in windows