HTML Connect User's Guide

APPENDIX D

Actions Created When Form Field Values Are Modified Interactively

When you are in Record mode and you interact with form fields inside the web page currently displayed in the Native Environment Pane, appropriate actions are automatically added to the Action Model in real time. For example, when you enter text into a text field in an HTML page, a Map Action is automatically generated. The following table shows which types of Actions are autogenerated in the Action Model when various field types are manipulated.

Field Type and User Action

Action(s) Created in the Action Model

User enters (or drags) text into a text field

Map Action:

  MAP string TO HTMLScreenDoc.XPath( path )

User checks a check box

Map Action. Example:

  MAP true TO HTMLScreenDoc.XPath("//input[@name = 'safe' and @value = 'on' ]").createXPath("/@checked")

User unchecks a check box

Function Action. Example:

  CALL removeCheckedAttr(HTMLScreenDoc.XPath("//input[@name = 'safe' ]"));

User selects a radio button

Map Action. Example:

  HTMLScreenDoc.XPath("//input[@name = 'safe' and @value = 'on' ]").createXPath("/@checked")

User deselects a radio button

Function Action. Example:

  CALL removeCheckedAttr(HTMLScreenDoc.XPath("//input[@name = 'safe' ]"));

User selects an item from a dropdown list

Function Action. Example:

  updateSelectedAttr(HTMLScreenDoc.XPath("/descendant::select[@name = 'num']/option"), '20 ');

User toggles an item in a list box

Function Action:

  CALL toggleListSelectedAttr( DOMelement, string, boolean )

NOTE:   See next Appendix for source code and usage of this and related custom ECMAScript function.

User clicks Submit button

Map Action followed by HTTP Post (typically). Example:

  CALL HTMLScreenDoc.XPath("//input[@name = 'Mode' and @value = 'SEARCH' ]").createXPath("/@checked")
  HTTP/HTML Post From "http://www.xyz.com/search.php"



Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...