Accessibility

TechNote

Troubleshooting JavaScript errors in Dreamweaver

To view/add comments, you must enable JavaScript in your browser.

When you perform a specific task, you may see a JavaScript error message when working in the Dreamweaver authoring environment. These design-time JavaScript errors usually prevent you from implementing a portion of Dreamweaver functionality. For example, the following JavaScript error message may appear when you try to save a file:

Another example of a possible JavaScript error: "While executing onLoad in tempURL_afterSave.htm, a JavaScript error occurred."

Note: These pop-up JavaScript errors in Dreamweaver are different than JavaScript run-time errors you may 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 run-time JavaScript errors are beyond the scope of this TechNote. Please refer to the Dreamweaver help files for errors resulting from JavaScript generated by Dreamweaver, or refer to a third-party JavaScript reference (see "Dreamweaver-related websites", TechNote tn_12607) for troubleshooting hand-coded JavaScript.

Sometimes, these internal JavaScript errors are also accompanied by a translator error message:

 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

Internally, Dreamweaver relies heavily on JavaScript. In fact, much of Dreamweaver functionality is enabled through the use of JavaScript files. This heavy use of JavaScript helps to make Dreamweaver easily extensible; developers only need 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 may 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 may 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 may have a conflict with some code on a particular page.
  • Does the error occur in all sites or just one?
    To test this properly, make sure you test this in a different site that does not use the same files. If the error only occurs in a certain site, then the issue may be specific to files and code within that site.
  • Does the problem persist if you restart Dreamweaver?
  • If using a server behavior, does the problem occur with all databases and tables?
    If not, then you may 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:

  1. Check the list of known JavaScript errors
  2. Install the latest update for your version of Dreamweaver
  3. Name objects referred to by JavaScript
  4. Delete the FileCache.dat file
  5. Try a new page
  6. Re-create the site cache
  7. For site specific errors, try deleting the .dws site cache file
  8. Mac users: check for special characters in paths
  9. Verify extensions are compatible with your version of Dreamweaver
  10. Disable extensions
  11. Uninstall extensions
  12. Recreate the Dreamweaver user configuration folder
  13. Run Dreamweaver in Selective Startup Mode or Diagnostic Startup Mode
  14. See additional TechNotes
1. Check the list of known JavaScript errors below, to see if your error is listed.
2. Install the latest update for your version of Dreamweaver, if one is available.
3. Verify that any object the JavaScript refers to 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 refers to 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" (TechNote 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. It is recommended to delete the FileCache.dat file if you are experiencing a JavaScript error related to "dwscripts" or if you are receiving a "translators were not loaded" error message. The string of characters after "FileCache-" may differ on your machine. The location of the FileCache.dat file depends your operating system and your version of Dreamweaver. Note that 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.

Dreamweaver CS3 on Windows Vista:
C:Users[username]AppDataRoamingAdobeDreamweaver 9Configuration


Dreamweaver CS3 on Windows XP:
C:Documents and Settings[username]Application DataAdobeDreamweaver 9Configuration

Dreamweaver 8 on Windows XP:
C:Documents and Settings[username]Application DataMacromediaDreamweaver 8Configuration

Dreamweaver 8 on Windows Vista:
C:Users[username]AppDataRoamingMacromediaDreamweaver 8Configuration

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 may be conflicting code or Dreamweaver behaviors on the page. Try to build a new 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:

  1. Within Dreamweaver, open the Site panel by choosing Window > Files.
  2. From the Files panel group, click the Options menu icon in the top 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 .dws site cache file for that site. For more details, see Dreamweaver crashes when performing a task related to site definitions (TechNote 5989f7f4).

8. Macintosh 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 are listed in "File or folder name in Mac OS may break Dreamweaver functionality" (TechNote tn_14452).

9. Verify extensions are compatible with your version of Dreamweaver

There may be a conflicting extension installed in Dreamweaver. For example, an extension may 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. We recommend searching the Dreamweaver newsgroup for some of the keywords in your JavaScript error message (for example, search using the text of the JS file name). A good way to search the newsgroup is with Google Groups, http://groups.google.com.

10. Disable extensions.

To manually test for an extension conflict, open the Extension Manager and disable the extensions that you installed in Dreamweaver and see if the issue persists. If turning off the extensions solves the problems, then go back into the Extension Manager and turn them back on one-by-one, until you isolate the problematic extension. If you identify a problematic extension, then notify the extension developer.

  1. Choose Commands > Manage Extensions.
  2. In the Extension Manager, select your version of Dreamweaver from the product list
  3. 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.

  1. Within the Extension Manager, select each extension.
  2. Choose File > Remove Extension.
12. Recreate the Dreamweaver user configuration folder.
Windows:
  • For Dreamweaver CS3, see "How to re-create the Dreamweaver user configuration folder (CS3 on Windows XP, Vista)" (TechNote kb401118).
  • For Dreamweaver 8, see "Re-creating the Dreamweaver user configuration folder on Windows" (TechNote 36bda422)
Macintosh:
  1. Quit Dreamweaver
  2. In the Mac Finder, browse to the following folder:
    • 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
  3. Rename the folder to "Configuration Old"
  4. Restart Dreamweaver and see if the problem persists.
13. Run Dreamweaver in Selective Startup Mode or Diagnostic Startup Mode.

Run Dreamweaver in Selective Startup Mode or Diagnostic Startup Modeas described in "Running Dreamweaver in Selective Startup Mode or Diagnostic Mode" (TechNote d2a8c508). This will ensure that possibly conflicting background applications such as anti-virus software and personal firewalls are disabled.

14. See additional TechNotes.

If the JavaScript errors still persist after you follow the suggestions above, then refer to 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 (TechNote tn_15481)
  • Troubleshooting system errors or freezes in Dreamweaver (8, CS3 on Mac OS X) - (TechNote kb401096)
Known JavaScript errors and solutions
  • "The following JavaScript error(s) occurred: At line 56 of file "C:Program FilesMacromediaDreamweaver 8ConfigurationSharedCommonScriptsdwscriptsExtData.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 error(s) occurred: Exception thrown in native function.
    See the following TechNote for more information: "JavaScript error and hang when performing Save To Remote Server" (TechNote kb401216)
  • "While executing applyBehavior in Show Pop-Up Menu.htm, the following JavaScript error(s) occurred:
    At line 27 of file "D:Program FilesMacromediaDreamweaverMXConfiguration BehaviorsActionsShow Pop-up Menu.js":
    ReferenceError: imgName is not defined. The action will not be added to your document"

    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).

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID: tn_19105
OS: Windows (All)
Mac OS (All)
Database: DB2
Informix
MySQL
Oracle
SQL Server
Sybase
MS Access

Products Affected:

dreamweaver