Editing JavaScript files

The JavaScriptâ„¢ editor lets you edit JavaScript files directly. If you add or update a function in the Source page and the Outline view is visible, the Outline view is refreshed as well.

Any changes you make in the Source page can be previewed using the Preview page.

To edit JavaScript in the source editor, follow these steps:

  1. Open a file that contains JavaScript by selecting the file name in the Project Explorer and right-clicking.
    • If it is a JavaScript file, click Open with > JavaScript Editor.
    • If it is an HTML or JSP file, click Open with > Page Designer and make sure that the Source tab is selected.
  2. If you are editing an HTML or JSP file, go to the JavaScript code in the Source view. The JavaScript portion of the file appears in the Properties view. (You can edit there, but the Properties view does not support source editor features such as content assist and dragging objects from the Snippets view.)
  3. Edit the code as necessary, using any of the available features. You can add or delete functions in any of the following ways:
    • Dragging objects from the Snippets view
    • Typing functions directly
    • Using content assist to receive prompting for valid function calls
  4. Save the file.
Related concepts
Page Designer
Quick Edit view
JavaScript editor
Related tasks
Creating JavaScript files
Previewing JavaScript code

Feedback