JS is client-side. CF is server-side. By the time the page gets to the
client where JS can/is run, CF is already completely out of the picture.
You could...
a) set a CF variable and render it as a JS variable
b) get fancy with some ajax to send off a request to CF to set/get a
variable and send back a response that you inject into the page somewhere
HTH
On Fri, Dec 14, 2012 at 3:50 PM, Les Irvin <[email protected]> wrote:
>
> I don't know diddly squat about javascript. But I want to take a JS
> variable, such as those addressed in this alert:
>
> alert("Your coordinates are " + position.coords.latitude + ", " +
> position.coords.longitude);
>
> and use it as a CF variable elsewhere on the page, like
> #position.coords.latitude# (of course this doesn't work).
>
> Can anyone shed some light for me?
>
> Thanks,
> Les
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:353487
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm