Therefore, the Catalog Id field
value added in the form is valid. Next, we shall generate a response to be
sent to the client application. A response contains one or more command
messages. Some of the commonly used command messages are discussed
in Table 8.1.
8.6 Processing an Ajax Request 171
Table 8.1 xajaxResponse Command Messages
Command Message Description
Assign Sets the specified attribute of an element in input page with
the method addAssign(string elementId, string attribute,
string data)
Append Appends data to the specified attribute of an element in the
input page with the method addAppend(string elementId,
string attribute, string data)
Prepend Prepends data to the specified attribute of an element in
the input page with the method addPrepend(string
elementId, string attribute, string data)
Replace Replaces data in the specified attribute of an element in the
input page with the method addReplace(string elementId,
string attribute, string replace, string data)
Script Runs the specified JavaScript code with method
addScript(string javascript)
Alert Displays an alert box with the specified message with the
method addAlert(string message)
If the number of rows in the result set obtained with the Catalog Id
value specified in the input form is zero, display a message in the
validationMessage div, ???Catalog Id is Valid???. The addAssign
method sets the innerHTML of the validationMessage div.
Pages:
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158