it may have something to do with casing - javascript is case sensitive On Jan 5, 2008 4:17 PM, Issac Rosa <[EMAIL PROTECTED]> wrote:
> Can someone see why the detailregion is not updating when using > Spry.Data.JSONDataSet? If I use Spry.Data.XMLDataSet, the detailregion > updates fine when I click a row. I am getting the resultset fine. Here is > my code. > > index.html: > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> > > <head> > <title>Spry Dynamic Example 4</title> > <script type="text/javascript" > src="/CFIDE/scripts/ajax/spry/includes/xpath.js"></script> > <script type="text/javascript" > src="/CFIDE/scripts/ajax/spry/includes/SpryData.js"></script> > <script type="text/javascript" > src="/CFIDE/scripts/ajax/spry/includes/SpryJSONDataSet.js"></script> > > <script type="text/javascript"> > var mydata = new Spry.Data.JSONDataSet("product.cfc > ?method=getProducts&returnFormat=json&queryFormat=column",{path:"DATA",pathIsObjectOfArrays:true}); > </script> > </head> > > <body> > > <style> > ..hot { > background-color: yellow; > } > > ..red { > background-color: red; > } > > </style> > > <div spry:region="mydata"> > <p> > <table width="100%" border="1"> > <tr> > <th onClick="mydata.sort('prod_name','toggle');" > style="cursor: pointer;">Name</th> > <th onClick="mydata.sort('cat_name','toggle');" > style="cursor: pointer;">Category</th> > </tr> > <tr spry:repeat="mydata" spry:setrow="mydata" spry:select="red" > spry:hover="hot"> > <td style="cursor: pointer;">{PROD_NAME}</td> > <td style="cursor: pointer;">{CAT_NAME}</td> > </tr> > </table> > </p> > </div> > > <div spry:detailregion="mydata"> > <h2>{PROD_NAME}</h2> > </div> > > </body> > </html> > > products.cfc: > <cfcomponent output="false"> > <cffunction name="getProducts" returnType="query" access="remote" > output="false"> > <cfset var q = ""> > <cfquery name="q" datasource="spry"> > select * > from products_view > order by prod_name asc > </cfquery> > <cfreturn q> > </cffunction> > </cfcomponent> > > > Thanks, > Issac > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295940 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

