Oracle Waveset 8.1.1 Deployment Reference

Javascript

Use to insert pre-formatted JavaScript into the page. This is useful if you are using the onClick or onChange properties in components and want to call custom JavaScript functions.

Though not required, consider specifying the name property when building components from XML forms. Using features such as field loops and field inclusion, you can add more than one JavaScript component containing the same script to the page. During HTML generation, JavaScript components that have the same name are included only once.

Example

<Display class=’Javascript’>
   <Property name=’script’>
      <String>
         function setTextFromSelect(sel, textFieldName) {
         if ( sel == null || sel.inchange ) return;
         sel.inchange = true;
         var textField = sel.form.elements[textFieldName];
         if ( textField == null ) return;
         textField.value = sel.value;
         sel.selectedIndex = 0;
         sel.inchange = false;
         }  // setTextFromSelect(sel, textFieldName)
      </String>
   </Property>
   <Property name=’noNewRow’ value=’true’/>
</Display>

The component has an extended property named script that can contain the JavaScript text.