I think the question he asked was not what he was really after.

If my previous post didn't work you can just create the var directly where
you are trying to access the form value

        var CurrCompareValues = #Session.CompareList#

instead of

        <input type="hidden" name="Session.CompareList"
value="#Session.CompareList#" />

        var CurrCompareValues = document.myform.Session.CompareList.value;

Ade


-----Original Message-----
From: Howie Hamlin [mailto:[EMAIL PROTECTED]
Sent: 23 March 2005 20:04
To: CF-Talk
Subject: Re: Reading Session Variables


It's not possible since session vars are server side only.

Regards,

--
Howie Hamlin - inFusion Project Manager
On-Line Data Solutions, Inc. - www.CoolFusion.com
inFusion Mail Server (iMS) - The Award-winning, Intelligent Mail Server
PrismAV - Virus scanning for ColdFusion applications
>>> Find out how iMS Stacks up to the competition:
http://www.coolfusion.com/imssecomparison.cfm


--- On Wednesday, March 23, 2005 2:52 PM, Chad McCue scribed: ---
>
> Does anyone know if it is possible to read session variables withing
> Javascript?
>
> Example,
>     Have a session variable called "CompareList"
>
>  <CFSET session.CompareList = "" />
>  <input type="hidden" name="Session.CompareList"
> value="#Session.CompareList#" />
>
>
> JS:
>     function ReadList() {
>         var CurrCompareValues =
>         document.myform.Session.CompareList.value; // This doesn't
>        work because of the Session.Comparelist
>     alert(CurrCompareValues); }
> name.
>
> Thanks
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.0 - Release Date: 21/03/2005


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199797
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to