greg, that is perfect. Thank You. just seems a little cludgy. would be nice if i could just call the var like a url inside the object returnd in the form. any how, this will di it for me..
thanks again! -paul On Thu, Nov 15, 2012 at 9:43 AM, Greg Morphis <[email protected]> wrote: > > no need to convert it to a array (I was trying to go that route but keeping > it a list works fine too) > > <cfset params = listgetat(FORM.some_url,2,"?") /> > <cfset chapter_id = 0 /> > <cfloop list="#params#" delimiters="&" index="i" > > <cfif find("chapter_id=", i)> > <cfset chapter_id = listgetat(i, 2, "=") /> > </cfif> > </cfloop> > <cfdump var="#chapter_id#" /> > > > On Thu, Nov 15, 2012 at 8:40 AM, Greg Morphis <[email protected]> wrote: > > > I'm sure there are several ways to do this > > <cfset FORM.some_url = " > > > http://somesite.com/some_display.cfm?some_id=4184&chapter_id=12120&passage_id=40099 > > "/> > > <cfset params = listgetat(FORM.some_url,2,"?") /> > > <cfset p = listtoarray(params,"&" ) /> > > <cfset chapter_id = 0 /> > > <cfloop array="#p#" index="i" > > > <cfif find("chapter_id=", i)> > > <cfset chapter_id = listgetat(i, 2, "=") /> > > </cfif> > > </cfloop> > > <cfdump var="#chapter_id#" /> > > > > > > > > > > > > On Thu, Nov 15, 2012 at 8:28 AM, morchella < > [email protected]>wrote: > > > >> > >> hey guys! > >> i could use a liitle help. i am trying to get a specific value. in this > >> example "chapter_id" > >> ListgetAt could work, but the returned form url cold have the value in a > >> different oposition at any time. > >> i thought i could use a delimiter specifiying ,"chapter_id=" but that > >> dosnt > >> seem to work. > >> > >> <cfset FORM.some_url = " > >> > >> > http://somesite.com/some_display.cfm?some_id=4184&chapter_id=12120&passage_id=40099 > >> " > >> /> > >> <cfset getChapterId = trim(ListLast(FORM.some_url,"chapter_id="))> > >> <cfset Param2 = ListGetAt(FORM.some_url,2,"&")> > >> > >> Param2: chapter_id=12120 << << Right, but only some times. > >> getChapterId: 40099 << << Wrong > >> > >> thanks a bunch. > >> i googled every thing from listtoarray to <cfdump > >> > var="#getPageContext().getRequest().getParameterValues('FORM.some_url')#"> > >> Which dosnt seem to gel with cf7!! > >> thanks a bunch for clear out the cob webs this am.. > >> -m > >> > >> > >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353175 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

