Troubleshoot JavaScript errors | Dreamweaver CS4, CS5, CS5.5Products affected
What's covered
Identify JavaScript errors
When you perform tasks within Dreamweaver, you sometimes encounter a JavaScript error message. These design-time JavaScript errors usually prevent you from implementing a portion of Dreamweaver functionality.
Example: The following JavaScript error message can appear when you save a file:

Another example of a possible JavaScript error: "While executing onLoad in tempURL_afterSave.htm, a JavaScript error occurred."
Important: These pop-up JavaScript errors in Dreamweaver are different from JavaScript runtime errors you encounter when viewing a page in a web browser. JavaScript errors in a web browser indicate a problem with embedded or linked JavaScript in the HTML page. These types of runtime JavaScript errors are beyond the scope of this TechNote. See the Dreamweaver Help files for errors resulting from JavaScript generated by Dreamweaver. Or, see a third-party JavaScript reference for troubleshooting hand-coded JavaScript.
Sometimes, a translator error message accompanies these internal JavaScript errors:
The following translators were not loaded due to errors: ASP.htm: has configuration information that is invalid. ASP.NET.htm: has configuration information that is invalid. ColdFusion.htm: has configuration information that is invalid. PHP_MySQL.htm: has configuration information that is invalid. JSP.htm: has configuration information that is invalid. XSLT.htm: has configuration information that is invalid.
JavaScript errors in Dreamweaver
Dreamweaver uses JavaScript to perform numerous internal actions. Adobe has implemented much of Dreamweaver functionality by using JavaScript files. This heavy use of JavaScript helps to make Dreamweaver easily extensible. Developers only have to have a good knowledge of JavaScript and access to the Dreamweaver API to add to or change the native functionality of Dreamweaver. However, the errors that Dreamweaver generates if it encounters a problem executing some action tend to be JavaScript errors.
JavaScript error troubleshooting tips
JavaScript errors in Dreamweaver usually indicate a conflicting Dreamweaver extension, a conflict with the code on a page or a bad installation of Dreamweaver. Here are a few questions that can help you isolate the problem:
- Does the error occur when using a specific feature?
For example, do you see the same error message every time you attempt to create a web photo album? This error can indicate a conflicting extension or a bad installation of Dreamweaver. - Does the error occur on a specific page or with all pages?
If the error doesn't occur with all pages, then you can have a conflict with some code on a particular page. - Does the error occur in all sites or just one?
To test this issue properly, make sure that you test a different site that does not use the same files. If the error only occurs in a certain site, then the issue can be specific to files and code within that site. - Does the problem persist if you restart Dreamweaver?
If the problem does not recur on relaunching Dreamweaver, then it's possible that a JavaScript file loaded incorrectly. - If using a server behavior, does the problem occur with all databases and tables?
If not, then it's possible that you have an issue with the database connection files or with the tables of the database itself.
Troubleshooting steps
After answering the questions above, follow the steps below to troubleshoot the errors:
- Check the list of known JavaScript errors
- Install the latest update for your version of Dreamweaver
- Name objects referenced by JavaScript
- Delete the FileCache.dat file
- Try a new page
- Re-create the site cache
- For site-specific errors, try deleting the .dws site cache file
- Mac users: check for special characters in paths
- Verify that extensions are compatible with your version of Dreamweaver
- Disable extensions
- Uninstall extensions
- Recreate the Dreamweaver user configuration folder
- Run Dreamweaver in Selective Startup Mode or Diagnostic Startup Mode
- See additional TechNotes
1. Check the list of known JavaScript errors.
Adobe has documented a number of known errors within Dreamweaver and have provided information to assist you in resolving the problem. For a list of known issues, see the Known JavaScript Errors Chart.
2. Install the latest Dreamweaver updates.
Updates provide fixes for a number of issues identified within Adobe applications. Download updates from the Adobe Updates page.
3. Verify that any object the JavaScript references is named in the code.
For example, if you have a behavior applied to an image, then that image must have a name. Likewise, if the behavior references another image, then that image must also have a name. All object names must be unique and must meet other criteria. Object naming is described in Naming strategies for Dreamweaver and various interpreters (tn_14610).
4. Delete FileCache.dat files from the Dreamweaver user configuration folder.
Delete the WinFileCache-7A9586CB.dat, MacFileCache-BFE7CE2E.dat, or FileCache.dat file from the Dreamweaver user configuration folder. Adobe recommends that you delete the FileCache.dat file if you are experiencing a JavaScript error related to "dwscripts. " Also delete the file if you receive a "translators were not loaded" error. The string of characters after "FileCache-" can differ on your machine. The location of the FileCache.dat file depends your operating system and your version of Dreamweaver. On Windows, the Application Data and AppData folders are hidden by default, so verify that your Windows Explorer folder options are set to View Hidden Folders.
Note: The [language] folder below is an abbreviation of the language you are currently using. Typically there is only one folder in this location.
- Mac OS:
Dreamweaver CS5.5: /Users/Your User Name/Library/Application Support/Adobe/Dreamweaver CS5.5/[language]/Configuration
Dreamweaver CS5: /Users/Your User Name/Library/Application Support/Adobe/Dreamweaver CS5/[language]/Configuration
Dreamweaver CS4: C/Users/Your User Name/Library/Application Support/Adobe/Dreamweaver CS4/[language]/Configuration
- Windows 7 or Windows Vista:
Dreamweaver CS5.5: C:\Users\Your User Name\AppData\Roaming\Adobe\Dreamweaver CS5.5\[language]\Configuration
Dreamweaver CS5: C:\Users\Your User Name\AppData\Roaming\Adobe\Dreamweaver CS5\[language]\Configuration
Dreamweaver CS4: C:\Users\Your User Name\AppData\Roaming\Adobe\Dreamweaver CS4\[language]\Configuration
- Windows XP:
Dreamweaver CS5.5: C:\Documents and Settings\Your User Name\Application Data\Adobe\Dreamweaver CS5.5\[language]\Configuration
Dreamweaver CS5: C:\Documents and Settings\Your User Name\Application Data\Adobe\Dreamweaver CS5\[language]\Configuration
Dreamweaver CS4: C:\Documents and Settings\Your User Name\Application Data\Adobe\Dreamweaver CS4\[language]\Configuration
For older versions of Dreamweaver, the configuration paths are as follows:
Dreamweaver CS3 on Windows Vista:
C:\Users\[username]\AppData\Roaming\Adobe\Dreamweaver 9\Configuration
Dreamweaver CS3 on Windows XP:
C:\Documents and Settings\[username]\Application Data\Adobe\Dreamweaver 9\Configuration
Dreamweaver 8 on Windows XP:
C:\Documents and Settings\[username]\Application Data\Macromedia\Dreamweaver 8\Configuration
Dreamweaver 8 on Windows Vista:
C:\Users\[username]\AppData\Roaming\Macromedia\Dreamweaver 8\Configuration
Dreamweaver CS3 on Macintosh:
Mac HD/Users/[user]/Library/Application Support/Adobe/Dreamweaver 9/
Dreamweaver 8 on Macintosh:
Mac HD/Users/[user]/Library/Application Support/Macromedia/Dreamweaver 8/
5. Try a new page.
There can be conflicting code or Dreamweaver behaviors on the page. Try to build a page from scratch with minimal behaviors and other design elements and see if you can reproduce the error. Custom code or modified Dreamweaver code can occasionally cause problems.
6. Re-create the site cache and see if the problem persists.
In particular, this step is useful for JavaScript errors related to templates, library items, and uploading files. This step is only available if the site is defined to use a site cache:
- Within Dreamweaver, open the Site panel by choosing Window > Files.
- From the Files panel group, click the Options menu in the upper-right corner, and choose Site > Recreate Site Cache.
7. For site-specific errors, try deleting the .dws site cache file.
If the JavaScript only occurs in one site definition, then delete the site cache file for that site. To delete the cache, choose Site > Advanced > Recreate Site Cache.
8. Mac OS users: Check for special characters in paths.
Check for any special characters in the hard drive name, in the path to the Dreamweaver configuration folder, or in the path to your site files. Examples of special characters that can cause conflicts include the following:
~ @ # $ % ^ & * ( ) + | / \ ';
9. Verify that extensions are compatible with your version of Dreamweaver.
There can be a conflicting extension installed in Dreamweaver. For example, an extension could have been designed to work with an older version of Dreamweaver. Check the extension developer's website to see if the extension is compatible with your version of Dreamweaver.
There are several JavaScript errors associated with third-party extensions. Adobe recommends searching the Dreamweaver forum. Search using some of the keywords in your JavaScript error message (for example, search using the text of the JS filename).
10. Disable extensions.
To manually test for an extension conflict, open the Extension Manager and disable the extensions that you installed in Dreamweaver. If turning off the extensions solves the problems, then turn them back on one-by-one, until you isolate the problematic extension. If you identify a problematic extension, then notify the extension developer.
- Choose Commands > Manage Extensions.
- In the Extension Manager, select your version of Dreamweaver from the product list
- Within the list of installed extensions, set the On/Off checkbox to Off for all Dreamweaver extensions.
11. Uninstall extensions.
If the JavaScript error persists after you disable all of the extensions, then uninstall the extensions in the Extension Manager. If you identify a problematic extension, then notify the extension's author.
- Within the Extension Manager, select each extension.
- Choose File > Remove Extension.
12. Recreate the Dreamweaver user configuration folder.
On Windows
- For Dreamweaver CS3, see "How to re-create the Dreamweaver user configuration folder (CS3 on Windows XP, Vista)" (TechNote kb401118).
- For Dreamweaver CS4 and CS5, see Resetting user's configuration in Dreamweaver CS4 and CS5 (cpsid_83912).
On Mac OS
- Quit Dreamweaver
- In the Mac Finder, browse to the following folder:
/Users/[username]/Library/Application Support/Adobe/Dreamweaver CS4 [or CS5]/[language]/Configuration
Note: For older versions of Dreamweaver, the paths are as follows:
Dreamweaver CS3:
Mac HD/Users/[user]/Library/Application Support/Adobe/Dreamweaver 9/Configuration
Dreamweaver 8:
Mac HD/Users/[user]/Library/Application Support/Macromedia/Dreamweaver 8/Configuration - Rename the folder to "Configuration Old."
- Restart Dreamweaver and see if the problem persists.
13. Run Dreamweaver in Selective Startup Mode.
- To start Windows XP in diagnostic mode, see Start Windows in Diagnostic mode (Windows XP) (kb404860) for details.
- To start Windows Vista/7 in modified mode, see Restart Windows in a modified mode (Windows Vista/7) (kb404913) for details.
14. See additional TechNotes.
If the JavaScript errors persist after you follow the suggestions above, then see the following TechNotes for additional troubleshooting suggestions. Uninstalling and reinstalling Dreamweaver, with anti-virus software disabled, is an important test to perform:
- Troubleshooting Dreamweaver for Windows (tn_15481)
Known JavaScript errors and solutions
| JavaScript Error | Solution |
"The following JavaScript errors occurred: At line 56 of file "C:\ Program Files\Adobe\Dreamweaver CS4\Configuration\Shared\Common\ Scripts\dwscriptsExtData.js": ReferenceError: dwscripts is not defined." |
Remove the WinFileCache-7A9586CB.dat file from the Dreamweaver user configuration folder. If that doesn't solve it, then recreate the Dreamweaver user configuration folder. These suggestions also apply if you are receiving the error message: "The following translators were not loaded due to errors." |
While executing DWMenu_File_SaveDocumentToRemoteServer command in menus.xml, the following JavaScript errors occurred: Exception thrown in native function. |
See the following TechNote for more information: JavaScript error and hang when performing Save To Remote Server (kb401216) |
"While executing applyBehavior in Show Pop-Up Menu.htm, the following JavaScript errors occurred: At line 27 of file "D:\Program Files\Macromedia\DreamweaverMX\Configuration\ Behaviors\Actions\Show Pop-up Menu.js": |
The image to which you are applying the behavior is not named, or there is a problem with the object name. For more information, see "Error 'While executing applyBehavior in Show Pop-Up Menu...'" (TechNote tn_16462). |
Doc ID
(kb405604)
Last updated
2011-05-10
OS
Mac OS 10.4
Mac OS 10.5
Mac OS 10.6
Windows Vista
Windows XP
Windows 7
Products affected
