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

cfscript and js disabled browsers

LEGEND ,
Dec 07, 2006 Dec 07, 2006

Copy link to clipboard

Copied

Hi All

I can't seem to find a definitive answer to this question so can anyone
answer me. will the JavaScript written inside a <cfscript> block still run
if the client has JavaScript disabled in their browser. I guess I mean. Will
this JavaScript be run by the server or is it still sent to the browser??

TY

Bill


TOPICS
Advanced techniques

Views

323

Translate

Translate

Report

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 ,
Dec 07, 2006 Dec 07, 2006

Copy link to clipboard

Copied

Hi All

I can't seem to find a definitive answer to this question so can anyone
answer me. will the JavaScript written inside a <cfscript> block still
run if the client has JavaScript disabled in their browser. I guess I
mean. Will this JavaScript be run by the server or is it still sent to
the browser??

TY

Bill


Your question begs a question, what do you mean by the JavaScript
written inside a <cfscript> block?


Because, the CFML script that is used inside a <cfscript> block IS NOT
JAVASCRIPT. YES, the CFML script will run, it is part of the CF server
side stuff that builds the response that is returned to the requesting
browser.

Now it is of course quite simple to use CFML script to generate dynamic
JavaScript that is returned with the response to be run on the client.
And, of course, this JavaScript will not run on browsers with JavaScript
disabled.

Votes

Translate

Translate

Report

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
Participant ,
Dec 07, 2006 Dec 07, 2006

Copy link to clipboard

Copied

Javascript = client side
<cfscript> = server side

Votes

Translate

Translate

Report

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 ,
Dec 07, 2006 Dec 07, 2006

Copy link to clipboard

Copied

CFScript is just a different set of logic control structures for CFML,
nothing more. The processing it does is identical, and the end result is
the same. All output from any CF processing is passed back to the
webserver and then to the browser, and it's up to the browser to decide how
to deal with it (render it, execute it, ignore it, etc).

CFScript has nothing to do with server-side JavaScript.

--
Adam

Votes

Translate

Translate

Report

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 ,
Dec 07, 2006 Dec 07, 2006

Copy link to clipboard

Copied

LATEST
Thanks all

Each answers my question.

Bill


Votes

Translate

Translate

Report

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
Documentation