This should work nicely, tried out earlier today in Safari, Firefox and Chrome. 
Storing available vars in session for use throughout the app. My use case is 
loading a different include file that consumes smaller jpg files for a slider 
for mobile devices:

<cfif Not IsDefined('session.screenwidth')>

<cflock scope="session" type="exclusive" timeout="30">
<cfset session.screenwidth = "<script>document.write(screen.width);</script>"> 
<cfset session.screenheight = "<script>document.write(screen.height);</script>">
<cfset session.availWidth = 
"<script>document.write(screen.availWidth);</script>">
<cfset session.availHeight = 
"<script>document.write(screen.availHeight);</script>">
<cfset session.colorDepth = 
"<script>document.write(screen.colorDepth);</script>">
<cfset session.pixelDepth = 
"<script>document.write(screen.pixelDepth);</script>">
</cflock>

</cfif>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:353604
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to