The only problem being that you can't do that......

CF is server-side and JS is client-side.  Any of the variables in JS will be
unavailable until the page reaches the users browser at which point it has
already been processed by CF Server.  You can only go from CF --> JS in one
page. ie.

<script>
        colourval = '#yourcfcolourvalue#';
</script>

If you want to go from JS --> CF then the page must be submitted by the user
in one way or another sending the JS variables via URL or form to
another/the same CF page, where the URL and FORM variables can be processed.


Regards

Stephen

> -----Original Message-----
> From: JoshMEagle [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 21 February 2001 16:39
> To: CF-Talk
> Subject: Allarie/Macromedia ColdFusion Feature Suggestion
>
>
> Proabably a bit late to place this request for 5.0 - but how about 6.0?
>
> Why don't you all make CF capable of grabbing JavaScript
> variables at will throughout the page using a function like
> scriptvar() or jsvar() or something like that? As many people as
> use ColdFusion together with JavaScript, this seems like it would
> have been addressed in version 1.0 - but now we're at 5.0 and
> still no mention of being able to easilly access JavaScript
> variables via CF.
>
> And no, I don't mean through a form submission, or in the URL or
> anything else - I mean mid page I'd like to be able to do something like:
>
> <script>
>     colorval=thing.style.backgroundColor
> </script>
>
> <cfoutput>You're using color: #jsvar(colorval)#</cfoutput>
>
>
> Not the best example, but you get the idea. I'm sure it presents
> logistical problems since CF is processed on the server and JS on
> the client, but you all are bright folks, surely you can figure
> this one out :) (please?)
>
> Just my $0.02, thanks for listening!
>
> Joshua Miller
> Web Development
> Eagle Technologies Group, Inc.
> Business Solutions for the Next Generation
> www.eagletgi.com
> [EMAIL PROTECTED]
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to