House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

populate ColdFusion variable using javascript array

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hello,
Charles Heizer
03/11/10 04:01 P
Hey Charlie,
William Seiter
03/11/10 04:08 P
Here is with JQuery:
Tony Bentley
03/11/10 07:35 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Charles Heizer
03/11/2010 04:01 PM

Hello, I would like to know if it's possible to set a coldfusion variable from a javascript array? If so how? What I really want to do is populate a cfinput with the values from the javascript array. Thanks, Charlie

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
William Seiter
03/11/2010 04:08 PM

Hey Charlie, Once the 'cfinput' is viewed in the browser, it is translated into a regular <input statement (view source to see) Javascript only runs after the page is translated to the regular <input statement, so you should be able to interact with that <input with javascript directly (no need to translate the javascript array into a coldfusion array) If you give more details of what you want to do, we can probably help. William ---------- William E. Seiter Hello, I would like to know if it's possible to set a coldfusion variable from a javascript array? If so how? What I really want to do is populate a cfinput with the values from the javascript array. Thanks, Charlie

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tony Bentley
03/11/2010 07:35 PM

Here is with JQuery: rry = []; $("input :checkbox :checked").each(function({ rry.push($(this).val(); }); $("input[name=textinput]").val(rry); Sorry, I'm not a big native javascript guy. Much easier with JQuery.


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

July 31, 2010

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
         1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31