Not within javascript no -- you have to pass another http
request back to the server and use a form or url variable to
populate the session. Which can be done with a hidden frame
or iframe if need be, or you can invesitage fusionscript or
a flash widget to pass data back to the server.
Isaac
> Is there a way in the javascript to output the entries
> into the javascript
> array into a CF session array?
> ----- Original Message -----
> From: "s. isaac dealey" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, August 12, 2003 12:25 PM
> Subject: RE: RE: ColdFusion and Javascript
>> The JS solution he's looking for isn't all that
>> complicated
>> actually....
>>
>> <input type="hidden" name="allchecked" value="#cfvalue#"
>> />
>> <input type="checkbox" onclick="gochecked(this);" />
>>
>> <script language="javascript">
>> function gochecked(fld) {
>> var x = 0;
>> var allchk = fld.form.allchecked.value.split(",");
>>
>> if (fld.checked==true) {
>> allchk[allchk.length] = fld.value;
>> }
>> else {
>> for (x = 0; x < allchk.length; x++) {
>> if (allchk[x]==fld.value) { allchk[x] = ""; break;
>> }
>> }
>> }
>>
>> fld.form.allchecked.value = "";
>> for (x = 0; x < allchk.length; x++) {
>> fld.form.allchecked.value += allchk[x] + ",";
>> }
>> }
>>
>> function goNext() { document.location.href = yadda yadda
>> +
> document.forms.myform.allchecked.value; }
>> </script>
>>
>> <a href="javascript:goNext();">next</a>
>>
>> hth
>>
>> Isaac
>>
>> Original Message -----------------------
>> Why dont you use WDDX,
>> when a check box is checked add it to an array with a
>> string index not an
>> int index,
>> only because its easier to delete if the checkbox is
>> unchecked,
>>
>> then when they click next page serialise the js array and
>> pass the wddx
>> along the url,
>> or do a form post on your next button links that passes
>> the wddx packet
>> inside a hidden field.
>>
>> Then update your sesion var server end before displaying
>> your data.
>>
>> Alernatively why not use a cookie and use javascript to
>> to append ids and
>> remove ids.
>> You have a max of 4k of data with a cookie.
>>
>> J
>>
>> -----Original Message-----
>> From: chad [mailto:[EMAIL PROTECTED]
>> Sent: 12 August 2003 15:05
>> To: CF-Talk
>> Subject: ColdFusion and Javascript
>>
>>
>> I need some help with integrating coldfusion and
>> JavaScript. I am building
> a
>> comparison application that will allow customers to
>> select products to
>> compare. I have a checkbox under each product that I need
>> (when selected)
> to
>> add that productID to a coldfusion array (which is a
>> session variable).
> The
>> reason why I am going with JavaScript is because I am
>> showing 25 products
>> per page, so when a user clicks on "Next Page" they don't
>> loose the
>> previously checked products. The "Next Page" is not
>> within a form tag, so
> I
>> can't just pass the checkbox variable.
>>
>> Any help would be great.
>>
>>
>>
>>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~|
> Archives:
> http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
> Subscription: http://www.houseoffusion.com/cf_lists/index.
> cfm?method=subscribe&forumid=4
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> This list and all House of Fusion resources hosted by
> CFHosting.com. The place for dependable ColdFusion
> Hosting.
> http://www.cfhosting.com
> Unsubscribe: http://www.houseoffusion.com/cf_lists/uns
> ubscribe.cfm?user=633.558.4
s. isaac dealey 972-490-6624
team macromedia volunteer
http://www.macromedia.com/go/team
chief architect, tapestry cms http://products.turnkey.to
onTap is open source http://www.turnkey.to/ontap
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4