Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AJAX, CFMX, JavaScript, and arrays

Status
Not open for further replies.

riluve

Technical User
Mar 11, 2005
78
0
0
US
So I am using JSMX and CFMX. I have them working using a simple object or CFFunction output, but I need to transfer an array (really a recordset).

I believe I have the server side working properly, but how do I address the resulting array in JS?

Sample code:
-server side-------------
<cfsetting enableCFoutputOnly="Yes" showdebugoutput="No">
<cfquery name = "q" dataSource = "RF02">
select Folio_Dir, Folio_Name from Folios_
</cfquery>
<cfwddx action="CFML2JS" input= "#q#" toplevelvariable="result">

-client side--------------
<script>
function Request(){ http( 'GET', 'jsmx.cfm', Response); }
function Response(){ alert(WddxRecordset.result[0]);}
</script>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top