Instruction set reference
HIPE_OP_APPEND_TAG
Appends a new HTML tag element as the last child within the specified tag element.
- location: The parent element inside which the new tag will be appended.
- arg[0]: The tag type (e.g. span or button).
- arg[1]: An optional id string to uniquely identify the new element. The tag id can be used in conjunction with CSS style rules or later in conjunction with HIPE_OP_GET_BY_ID.
- arg[2]: Currently un-used (see notes)
Notes
When building up a table (or similar layout-intensive element) by appending td elements to it, keep the table hidden (use the display style property for this purpose) until it is complete. It will display faster overall, since Hipe will not have to keep recalculating and re-rendering the layout as you add your table cells.
Prior to version 2, Hipe accepted an extra argument in arg[2] where passing "1" would cause the server to reply with a HIPE_OP_LOCATION_RETURN instruction describing the newly appended tag. This was removed in version 2. A more efficient way to obtain the new location is by calling the hipe_newest_location() function (C) or the hipe::loc::appendAndGetTag() method (C++) in the hipe API.