It also makes sense to consider - WHEN do you want to save the array? WHAT exactly do you want to do with it? It sounds like you want to store it to a db, right?
So I assume your current app has an array of JS data, user clicks a button, and you want it to go to a CFM page that can insert it into the db, right? On Fri, Aug 5, 2011 at 3:48 PM, Raymond Camden <[email protected]> wrote: > Well, you can encode an array as a string: > > 1,2,4,9 > > and then save that value into a hidden form field. > > How about this - I can do a blog post - but not till the morning. > Someone else may reply sooner too. > > On Fri, Aug 5, 2011 at 3:45 PM, Mo Lay <[email protected]> wrote: >> >>> You have to remember - JavaScript is on the client side. CF is on the >>> server side. >>> >>> If you have some data in a JS array, the only way to get it to CF is >>> to use Ajax, or to use JS to populate the values into a form field >>> and >>> submit the form. >>> >>> >>> On Fri, Aug 5, 2011 at 2:40 PM, Mo Lay <[email protected]> >>> wrote: >>> > >>> > Hi All, >>> > >>> > How to get the contents of a javscript array into acoldfusion array? >>> I am coding in Coldfusion MX7.0 and Javascript. My problem is that i >>> am unable to get the values of a javascript array into a coldfusion >>> array. I have a javascript array containing some values. Now i want to >>> insert the values present in this javascript array into the database >>> through a Insert query (within a <cfquery> tag). >>> > >>> > thank you >>> > >>> > >> >> >> Hi Raymond, >> thanks for the quick reply . >> can you please elaborate on how i can capture the values in a form field ? >> how i will be able to send them to the database ..if they are in one form >> field.. ? >> >> thanks >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5396 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
