Ok, for my next trick I am running into an issue trying to pull a random element form my XML
 
 
   <cfscript>
   param("attributes.type","FCT");
   GetFactoid=qContent.Get(ctcd=attributes.type); //CFC to grab XML from Db
   list=structkeylist(GetFactoid.XmlFeed[1].contentdata.XmlChildren[1]); //Make sure what I need is in the struct
   MaxFactoid=GetFactoid.RecordCount; //max number of records
   RandFactoid=RandRange(1,MaxFactoid); //randomize the value
   param("factoid","Sorry, there are currently no factoids available");
   param("live");
   param("rotate");
   if (listfindnocase("factoid,live,rotate",list)){
     Factoid=GetFactoid.XmlFeed[1].contentdata.XmlChildren[1].factoid[RandFactoid].XmlText; //Grab a random fact
     }
   </cfscript>
      #Factoid#
 
 
There are 2 records in there yet all I get is Sorry, there are currently no factoids available.  Any thoughts?
 
 
 
Regards,
Michael J. Sammut
________________________________________________
F O U R  E Y E S  P R O D U C T I O N S
 
think | plan | create :: web site design & development
 
http://www.foureyes.com
 
E. [EMAIL PROTECTED]
T: 718.254.9557 ext. 101
F: 718.254.0399

Reply via email to