CF_Check form being generated automatically

Posted on 2006-04-12
Last Modified: 2008-02-26

Some of my pages on my development website,, 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;


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>';

<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

<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))];

And if so, are there any suggestions to stop that first code from being generated? Thanks!!
Question by:mel150
    LVL 11

    Accepted Solution

    Hi mel,

    Are you using ColdFusion form validation code?

    According to :

    "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
    function _CF_checkCFForm_1(_CF_this)

    and etc.

    I hope this reference helps.

    Peace and joy.  mvan

    Author Comment

    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.

    LVL 11

    Expert Comment

    Sorry, 'dunno.  :-\

    Peace and joy.  mvan

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: HTML5 Mobile App Development with PhoneGap

    PhoneGap can help you leverage your already existing HTML5, JavaScript, and CSS skills in order to create and deploy cross-platform mobile apps.This program comprehensively covers HTML5 mobile app development from top to bottom.

    There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
    SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now