Where can I add javascript functions to a webform?

Article:HOWTO10046  |  Created: 2009-04-21  |  Updated: 2009-04-21  |  Article URL http://www.symantec.com/docs/HOWTO10046
Article Type
How To



Question
How do I add my own javascript functions to a webform?

Answer
You can add your own javascript functions to a webform using the following procedure.  When making javascripts within a webform, these function calls are case sensitive:

  1. With the webform open, right click on the form background and choose edit



  2. Click on the Behavior tab, and enter your function into the script section:




    Sample Function:

    function displaymessage()
    {
    alert("Hello World!");
    }

  3. Modify the component that will execute the event, and add a Custom Event of AttributesKeyValuePair

  4. Select a javascript event to capture:
    Sample:
    onclick

  5. Enter your call to the function in the Event Handler field:
    Sample:
    myfunction()



  6. Optional:  You may need to select the option to Specify Control ID if you are calling data from a component to a function, or if the function requires the ID of the component to execute.  Once selected, you may specify your own name, or use the name_GUID specified by default with this option.

Legacy ID



46704


Article URL http://www.symantec.com/docs/HOWTO10046


Terms of use for this information are found in Legal Notices