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

Javascript and CF

Participant ,
Sep 01, 2008 Sep 01, 2008
I get javascript code off the net, and sometimes it is written for me, to incorporate into the cf applicaton.

Sometimes, in the form statement, onClick ="return functionname() - or functionname(this)" is used, sometimes it is onSubmit.

Other times, the onClick and/or onSubmit is used in the input type="submit" button, other times the type is defined as a button and the submit part is called in the javascript.

What is the proper way to call javascript from coldfusion ?
254
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 ,
Sep 01, 2008 Sep 01, 2008
LATEST
there is no "proper way" to "call javascript from coldfusion": cf runs
on the server and is totally oblivious to your client-side javascript.

how you write and call your js functions depends solely on the purpose
of the function and where (which html element in your page or which
other js function) it is called from.

just one thing to keep in mind if you are using cf8 ajax features:
declare your in-page js functions as functionname = function() [instead
of function functionname()], or use external js scripts and declare them
any way you want.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
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