Adding scripted events to Web pages

You can use the Quick Edit view to add scripted events to your Web pages

To add scripted events:

  1. Open an HTML or JSP file in Page Designer.

  2. Select a tag in the HTML or JSP file. For example, select a

    Submit button in Page Designer or its corresponding FORM tag in the source editor.

  3. Open the Quick Edit view if it is not already open (

    Window | Show View | Quick Edit in the Web perspective ).

  4. Select an event in the event pane (the left pane) of the Quick Edit view. For example, select an

    onclick event.

  5. You can add script to the script editor (the right pane) in one of the following ways:

    • Type directly in the Quick Edit script editor.

    • Drag a snippet from the Snippets view.

    • Insert snippets by clicking the menu icon in the Quick Edit toolbar and choosing

      Insert Snippet. Select a snippet from the list of snippets that opens.

    Tip: Before you drag and drop items or text from the Snippets view onto the Quick Edit view, make sure that the Quick Edit view is cleared of the

    Insert a code snippet instruction. You can clear the instructions by clicking in the script editor pane.

  6. Select the next tag to which you want to add a scripted event or select another event, and repeat the procedure.

 

Related concepts

Quick Edit view

 

Related tasks

Adding snippets in the Quick Edit view

Adding snippets from the Snippets view