Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 646929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:40:01+00:00 2026-05-13T21:40:01+00:00

Does anyone know of a solution to the following markup validation error? I’m not

  • 0

Does anyone know of a solution to the following markup validation error? I’m not sure if this is an issue in ColdFusion or my own code, but the output of the following snippet does not validate correctly on W3C markup validation service:

Code

        <cfform class="SearchForm" id="SearchForm" action="">
            <fieldset>
                <cfinput type="text" class="TNameField" name="TName" autosuggest="cfc:MyCFC.MyFunction({cfautosuggestvalue})">
                <input type="button" class="TNameButton" value=" " />
            </fieldset>
        </cfform>

HTML Output

<form id="SearchForm" action="" method="post" class="SearchForm" onsubmit="return _CF_checkCFForm_1(this)">

The validation error is associated with the “name” attribute that ColdFusion automatically assigns to . The error message is the following:

there is no attribute “name”

the document type you are using does
not support that attribute for this
element. This error is often caused by
incorrect use of the “Strict” document
type

I am assuming the AJAX requires the “name” attribute to function correctly. How do I resolve this validation error? Do I have to change my document type?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:40:02+00:00Added an answer on May 13, 2026 at 9:40 pm

    You do not have to have a name attribute on a form for AJAX to work properly (including any ColdFusion generated AJAX). Here is the relevant information from the name attribute of the cfform element:

    In HTML format, if you omit this attribute and specify an id attribute, ColdFusion
    does not include a name attribute in the HTML sent to the browser; this behavior
    lets you use the cfform tag to create XHTML-compliant forms. If you omit
    the name attribute and the id attribute, ColdFusion generates a name of the
    form CFForm_n where n is a number that is assigned serially to the forms on a page.

    Short answer: keep an id, remove the name attribue, and your page will validate. Don’t forget that id must be unique across all elements in the page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

does anyone know if and how the solution for following question (which is written
Does anyone know of a cleaner solution for the following: I'm running a matlab
Does anyone know why the following generates an error on VC9? class Elem; class
Does anyone know whats the solution for pre iOS5 if I want to show
Does anyone know a good solution for implementing a function similar to Ruby's timeout
Does anyone know how to move the Solution Explorer tab in Visual Studio 2005?
Does anyone know a cross-browser, reliable solution for catching presses of the tab-key in
Does anyone know about a good way to accomplish this task? Currently i'm doing
Does anyone know how to make the following Matlab code approximate the exponential function
Does anyone know of a good/usable ASP.NET MVC code/solution generator. Ideally it would build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.