Matt,
Thanks for your help, I figured it out late in the day yesterday. I'll
include my code below.

CFAJAX function to call the results
 DWREngine._execute(_cfscriptLocation, null, 'addLinks', linkName, linkURL,
myLinksResult);
 return false;
  function to return the results form a JS array to some html code (I wish I
didn't have to write dynamic html like this)
 function myLinksResult(linkResults)
{
if (linkResults.length>0)
{
var output = "";

output = "<div class='css_fblk_md'>";
for (j=0; j<linkResults.length; j++)
{
output += "<span style='width:150px; padding-left:10px; float:left;'><a
href='" + linkResults[j].LINKURL + "' target='_blank' >" +
linkResults[j].LINKNAME + "</a></span>";
output += "<span><a href='someJSHere'>x</a></span><br />";
}
output += "</div>";
}
document.getElementById("divData").innerHTML = output;
}
  HTML code to display query results from above
<div id="divData"></div>
  This isn't all my code yet, but it's getting there. I'm simply just trying
to bill an add you own links function similar to what GOOGLE has for their
new customizable home page to my application. So far it's looking pretty
good and it's a good way to learn CFAJAX I think.
 Ryan

 On 11/17/05, Matt Woodward <[EMAIL PROTECTED]> wrote:
>
> 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
>



--
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

Reply via email to