> -----Original Message-----
> From: Dave l [mailto:[EMAIL PROTECTED]
> Sent: Sunday, February 11, 2007 4:12 AM
> To: CF-Talk
> Subject: Re: js to cfscript ? but new issue
> 
> ok so, I stayed with just js.
> 
> Now what I want to do is get the users screen resolution and put it into 2
> form fields (to resize a wallpaper) and maybe its just late or im a retard
> or both but heres what i got goin on.

Here's an old (jeeze, a 7-year old) article I wrote that will explain how to
do this (make these JavaScript values available for CF to use):

http://www.depressedpress.com/Content/Development/ColdFusion/Articles/GetRes

Remember tho' - as others have said - you've got to have an understanding of
how a request in CF works to understand why your initial attempts wouldn't
work.  Simply:

1) The Browser makes a request.  It waits for a response and can do nothing
else until it gets one.

2) The Server receives the request.  It gives it to CF to handle.

3) CF folds, spindles and mutilates the request.  Once it's done it hands
the results to the Server.  At this point CF is done - it can't do anything
further with this request.

4) The Server hands back the results (possibly after modifying them further)
to the Browser.

5) The Browser receives the request.  At this point any JavaScript in the
page can run.  The browser has, essentially, received static HTML: it
doesn't "know" that CF did anything to the page and definitely can't "talk"
to CF in any way.

This very linear, segmented process can be confusing for the simple fact
that all the source code (javascript, CF, etc) is all in the same place.
But it definitely doesn't run at the same time.

CFML runs at the server (and while it's running the client is unable to do a
thing with it) and JavaSript runs on the client (and while it's running the
server can't do a thing with it).

(The edges of the picture can be fuzzy, as you'll see in the article, but
the basic premise remains.)

Jim Davis



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269457
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to