I'd have to refresh my memory on this, but I'm pretty sure a query
comes back as an associative array, so you'd have to use
arrayName["FIELDNAME"][rownum] (or it might be the other way around)
to get at things. It's not a simple array, and I'm pretty sure that
the field name DOES need to be in all caps.
Matt
On 11/16/05, Ryan Everhart <[EMAIL PROTECTED]> wrote:
> Hey Everyone,
> I've been dabbling in CFAJAX a bit and I stubbling over how to return query
> results from my cffunction page to the requesting page
> Bellow is my code that gets exectued. As you can see it excutes a function
> called addLinks which sends linkName ande linkURL to the function and
> returns results called addLink_result (a list of links)
> function linkAdded()
> {
> // declare local variables for this js function
> var linkName = document.addlink.LinkName.value;
> var linkURL = document.addlink.LinkURL.value;
>
> DWREngine._execute(_cfscriptLocation, null, 'addLinks', linkName, linkURL,
> addLink_result);
> return false;
> }
> to keep it simple now I'm simply just trying to write the results to the
> page using this code
> function addLink_result(linkResults)
> {
> if (linkResults.length > 0)
> {
> for (var j=0; j < linkResults.length; j++)
> {
> document.write(linkResults[j] + "<br />");
> }
> }
> }
> However this does not return the results but a value of [object Object].
> I've never seen this before. Can someone enlighten me on how to return
> results from a query to a page through the JS?
> Thanks,
> Ryan
>
> --
> Ryan Everhart
> [EMAIL PROTECTED]
> _______________________________________________
> List mailing list
> Reply to DFWCFUG:
> [email protected]
> Subscribe/Unsubscribe:
> http://lists1.safesecureweb.com/mailman/listinfo/list
> List Archive:
> http://lists1.safesecureweb.com/mailman/private/list
>
--
Matt Woodward
[EMAIL PROTECTED]
http://www.mattwoodward.com
_______________________________________________
List mailing list
Reply to DFWCFUG:
[email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archive:
http://lists1.safesecureweb.com/mailman/private/list