User Guide

352 Chapter 18 Interacting with Remote Servers
<!--- Navigation & submission bar --->
<input type="button" value="Next" onclick="doNext()">
<input type="button" value="Serialize"
onclick="serializeData(personInfo, document.personForm.wddxPacket)">
<input type="submit" value="Submit">
<P>
Names added so far:<br>
<select name="names" size="5">
</select>
<p></p>
<!--- This is where the WDDX packet will be stored --->
<!--- In a real application this would be a hidden input field. --->
WDDX packet display:<p>
<textarea name="wddxPacket" rows="10" cols="80" wrap="Virtual">
</textarea>
</form>
<!--- Server-side processing --->
<hr>
<p><B>Server-side processing</B></p>
<cfif isdefined("form.wddxPacket")>
<cfif form.wddxPacket neq "">
<!--- Deserialize the WDDX data --->
<cfwddx action="wddx2cfml" input=#form.wddxPacket#
output="personInfo">
<!--- Display the query --->
The submitted personal information is:<P>
<cfoutput query=personInfo>
Person #CurrentRow#: #firstName# #lastName#<BR>
</cfoutput>
<cfelse>
The client did not send a well-formed WDDX data packet!
</cfif>
<cfelse>
No WDDX data to process at this time.
</cfif>