Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Javascript to Coldfusion

Participant ,
Jan 22, 2009 Jan 22, 2009
How can I pass a value from javascript into coldfusion array?

Thanks
TOPICS
Advanced techniques
587
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 22, 2009 Jan 22, 2009
dchard wrote:
> How can I pass a value from javascript into coldfusion array?
>
> Thanks

That same ways you pass any data from the Client PC on your desk to the
server, where ever that is.

This question is a common one indicating a lack of understanding that
ColdFusion runs on the server and JavaScript runs on the client and
never shall the two meet.

You can use ColdFusion to build JavaScript before it is sent to the
client, including data. This is a very powerful thing.

JavaScript can send data from the client to a ColdFusion web page that
does any of the normal things that such a web page does with data it
receives. This is done in any of the normal manners, through Cookies,
URL (aka get) or form (aka post) variables. This happens with a normal
request to the web server.

With an asynchronous JavaScript request, this can be done behind the
scenes by the client browser, making for a more seamless user experience.

But in the end JavaScript and ColdFusion, while they can be coaxed into
passing data on, never work together.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 22, 2009 Jan 22, 2009
LATEST
With great difficulty. js runs on the client and cf runs on the server, so, you need to make a page request that includes your javascript values as a variable that cf can read.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources