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 6623581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:32:58+00:00 2026-05-25T21:32:58+00:00

I have a form that uses .delegate to apply input validation to the form

  • 0

I have a form that uses .delegate to apply input validation to the form however, it appears any form with quotes just disappears.. No errors, the quote just disappears. Anyone know why this is happening? The only work around is to output the default value in the textbox as & #34; otherwise, the quotes will not appear in the textbox, even if it is actually in the value (view source).

The input type=”text” also uses CSS3 styling, not sure if this has anything to do with it..

Basically, input type=”text” value=”quotes””” or value=”quotes”” will only display ‘quotes’ in the rendered html, while the source has the correct value in it.

It’s only doing this on textboxes being targeted by the .delegate code, which is applying “blur” “focus” on the text boxes, and the function is just adding classes and checking if val() = “”.. the actual value in the textbox isn’t being passed in the .delegate function.

The only time the textboxes which are in the delegate code:

    if ($(this).val()=="")
    if ($("#divid").val()=="")
  • 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-25T21:32:59+00:00Added an answer on May 25, 2026 at 9:32 pm

    You have to escape the quotes:

    Either use " (NOT to be used to mark attributes).
    When your string is constructed using ", the attribute markers should be escaped using \".

    Examples:

    • "<input type=&quot;text&quot;>" wrong, cannot use &quot; to mark attributes
    • "<input type="text">" wrong, the inner quotes has to be escaped
    • "<input type=\"text\">" OK, properly escaped.
    • "<input value=\"&quot;\">" OK, properly escaped. Parsed to an input field with a value of a quotation mark (").

    EDIT

    To clarify: <input type="text" value="quotes"""> within a single quote (`) OR HTML source are interpreted in this way:

    1. Detected <input start tag.
    2. Found an attribute called type.
    3. The type attribute has a value (=)
    4. The first non-whitespace character after the = character is a quote". Searching for the first occurence of a quote after this quote..
    5. End quote found, the value of type is type.
    6. Found another attribute: value
    7. The attribute defines a value, because a = is found.
    8. The first non-whitespace character is a quote. Search for the next quote after this quote.
    9. Quote mark found, the value of the value attribute is quotes.
    10. Looking for the next attribute…
    11. Found an unexpected "". Ignored.
    12. Found close tag, the final parsed element is: <input type="text" value="quotes">.

    When your JavaScript string is defined using double quotation marks,", the previously used substring will cause a JavaScript error: "<input type="text. The JS interpreter found an unexpected character after the closing quote: t.

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

Sidebar

Related Questions

I have a form that uses the excellent jQuery validation plugin. This is a
I have a form that uses a div that is positions over some input
I have a form generator that uses (perl compatible) regexes for ther backend validation.
Richfaces 3.3.3, Jsf 1.2: I have a a4j:form that uses some simple validation, mainly
I have a simple form that uses jQuery validation to notify the user of
I have a form that uses the validation plugin, but I need to validate
I have a form that uses jQuery to submit an ajax post and it
I have a form that uses Richtexteditor of Flex3 to write in their reply.
I have a Django form that uses a different number of fields based on
I have a WPF form that uses ClientLogin to log a user into their

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.