This content has been marked as final. Show 6 replies
js is client side, cf is server side.
So, when cf tries to evaluate the "somethingElse" "something" does not exist.
But once the page is loaded into the browser, then you can use "something" using js code.
Thanks for the response.
I do understand the client/server logic but are you saying it's not possible to set a js var with coldfusion and return the var via the same script with 1 page load?
If this is the case - this surprises me with such a capable language. I'm no expert but if it's really not worth me experimenting this route I'll have to try 'somethingElse' ...
Thanks for your help
It's possible. Set your cf var before the html body tag and run your js function in the body onLoad event handler.
If I have this right, you have a form where a user enters data and then the function is called to convert the data to a different format? Or does the data exist already in the form and user calls function(button click, etc) to convert the data?
Thanks for the response - This worked a treat!