> I am using jQuery/ajax to pass a value to search for in the database.
 This all seems to work fine except what is returned is a WDDX packet

Do you have control of code that currently returns WDDX packet?  If so, why
not edit it to use cfwddx action = "wddx2js"  SEE
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_u-z_2.html#2682044
<http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_u-z_2.html#2682044>

On Tue, Jul 20, 2010 at 7:47 AM, Will Blake <[email protected]>wrote:

>
> Hello all,
>   I have a select menu that I need to be dynamically populated with the
> results of a db query.  I am using jQuery/ajax to pass a value to search for
> in the database.  This all seems to work fine except what is returned is a
> WDDX packet and I cannot figure out how to take the data that is returned
> and put it in the dynamic select menu.
>
> I know CF has a de-serializier but, as this is done at run time on the
> client machine I do not see how that would help.  I know jQuery/JS you can
> use the eval() function to parse the wddx packet, but the data that comes
> out looks the same as the data going in. How do I navigate the wddx packet?
>  I have tried what would make sense (i.e. data.fieldName.value)but what
> JavaScript shows me is blank or undefined.
>
> Thanks!
>
> Here is a copy of the packet:
> <wddxPacket version="1.0">
>  <header/>
>  <data>
>    <recordset rowCount="3" fieldNames="SCNDRY_CAT_ID,SCNDRY_TXT"
> type="coldfusion.sql.QueryTable">
>      <field name="SCNDRY_CAT_ID">
>        <number>4.0</number>
>        <number>5.0</number>
>        <number>6.0</number>
>      </field>
>      <field name="SCNDRY_TXT">
>        <string>ARL Special Dispatch</string>
>        <string>APG Special Dispatch</string>
>        <string>ARL - APG Dispatch</string>
>      </field>
>    </recordset>
>  </data>
> </wddxPacket>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335516
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to