[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

CF_Check form being generated automatically

Hi-

Some of my pages on my development website, http://dev.mymagickitchen.com, load slowly. WHen that happens and I go back to the code, I find that this has been somehow automatically generated several times:

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--

function  _CF_checkCFForm_1(_CF_this)
{
      return true;
}


//-->
</SCRIPT>

If I delete those, it is fast again. Is it because of this javascript which is on all of those pages?

<script type="text/javascript">
<!--
     function getQuote()     {
          var quote = new Array(
          "quote 1",
          "quote 2",
          "quote 3",
          "quote 4",
          "quote 5"
          );
          quote.innerHTML='<p class="quote">' + quote[Math.round(Math.random()*(quote.length-1))] + '</p>';
     }
 -->
</script>

<style type="text/css">
<!--
     #quote     {
       font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; color: #703FAF
     }
 -->
</style>


<script type="text/javascript">

<!--
     function getQuote()     {
          var quote = new Array(
          "One of the very nicest things about life is the way we must regularly stop whatever it is we are doing and devote our attention to eating.” <br><br>Luciano Pavarotti and William Wright",
          "We may live without poetry, music and art; We may live without conscience and live without heart; We may live without friends; We may live without books; But civilized man cannot live without cooks.<br><br>Edward Robert Bulwer-Lytton",
          "I find a recipe is only a theme, which an intelligent cook can play each time with a variation.<br><br>Madame Benoit",
          "I consider the discovery of a dish which sustains our appetite and prolongs our pleasures as a far more interesting event than the discovery of a star.<br><br>Henrion de Pensey",
          "Cooking is like love. It should be entered into with abandon or not at all.<br><br>Harriet Van Horne"
          );
          document.getElementById("quote").innerHTML = quote[Math.round(Math.random()*(quote.length-1))];
     }
 -->
</script>

And if so, are there any suggestions to stop that first code from being generated? Thanks!!
0
mel150
Asked:
mel150
  • 2
1 Solution
 
mvan01Commented:
Hi mel,

Are you using ColdFusion form validation code?

According to http://coldfusion.juxta.com/2452c15.PDF :

"All the ColdFusion form tags (CFINPUT, CFSELECT, CFTABLE, and so on) with the
exception of CFGRID and CFSLIDER provide two attributes that allow client-side
validation of required fields."

Farther down the article, we find an example, which begins:

<CFFORM METHOD=”POST” ACTION=”submit.cfm”>

and later:

When you do this, ColdFusion generates all the JavaScript code needed for form
validation:
<script LANGUAGE=JAVASCRIPT>
...
function _CF_checkCFForm_1(_CF_this)

and etc.

I hope this reference helps.

Peace and joy.  mvan
0
 
mel150Author Commented:
Thanks-I think that's the answer, I guess the question now is... how do I get rid of it? :)

Or is there a way to get it to generate it once, then have it go away?  Thanks-if you don't know the answer to that last, I'll accept your answer and close the question.

:)
0
 
mvan01Commented:
Sorry, 'dunno.  :-\

Peace and joy.  mvan
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now