Adobe InDesign CS5 Server (7.0) Object Model JS: CrossReference

InDesign Server CS5

Class

CrossReference

 A cross reference to a different index topic. (For cross references in text, use the 'cross reference source' and 'hyperlink' objects.)

QuickLinks

addEventListener, extractLabel, getElements, insertLabel, remove, removeEventListener, toSource, toSpecifier

Hierarchy

Topic
CrossReference
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
crossReferenceTypeCrossReferenceType:
CrossReferenceType.SEE_OR_ALSO_BRACKET
CrossReferenceType.SEE
CrossReferenceType.SEE_ALSO
CrossReferenceType.SEE_HEREIN
CrossReferenceType.SEE_ALSO_HEREIN
CrossReferenceType.CUSTOM_CROSS_REFERENCE
CrossReferenceType.CUSTOM_CROSS_REFERENCE_BEFORE
CrossReferenceType.CUSTOM_CROSS_REFERENCE_AFTER
r/wThe text that precedes or follows the referenced topic.
customTypeStringstring r/wThe text used for a custom cross reference type. Note: Valid only for custom cross reference types.
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
idnumber readonlyThe unique ID of the CrossReference.
indexnumber readonlyThe index of the CrossReference within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
namestring r/wThe name of the CrossReference; this is an alias to the CrossReference's label property.
parentTopic readonlyThe parent of the CrossReference (a Topic).
propertiesObject r/wA property that allows setting of several properties at the same time.
referencedTopicTopic r/wThe topic to which this CrossReference points.

Methods

Instances

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

Array of CrossReference getElements ()
Resolves the object specifier, creating an array of object references.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void remove ()
Deletes the CrossReference.

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

string toSource ()
Generates a string which, if executed, will return the CrossReference.

string toSpecifier ()
Retrieves the object specifier.

Used in:

CrossReference CrossReferences.nextItem (obj: CrossReference)

CrossReference CrossReferences.previousItem (obj: CrossReference)

Return

Array of CrossReference CrossReference.getElements ()

CrossReference CrossReferences.[] (index: number)

CrossReference CrossReferences.add (referencedTopic: Topic, crossReferenceType: CrossReferenceType[, customTypeString: string][, withProperties: Object])

CrossReference CrossReferences.anyItem ()

Array of CrossReference CrossReferences.everyItem ()

CrossReference CrossReferences.firstItem ()

CrossReference CrossReferences.item (index: varies)

CrossReference CrossReferences.itemByID (id: number)

CrossReference CrossReferences.itemByName (name: string)

Array of CrossReference CrossReferences.itemByRange (from: varies, to: varies)

CrossReference CrossReferences.lastItem ()

CrossReference CrossReferences.middleItem ()

CrossReference CrossReferences.nextItem (obj: CrossReference)

CrossReference CrossReferences.previousItem (obj: CrossReference)

Jongware, 23-Mar-2011 v3.0.3dContents :: Index