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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:05:05+00:00 2026-05-29T11:05:05+00:00

errorPlacement: function(error, element) { if (element.next().attr(id) == errordiv) { element.next().remove(); } var msg =

  • 0
  errorPlacement: function(error, element) {
        if (element.next().attr("id") == "errordiv") {
            element.next().remove();
        }
    var msg = error.get(0).textContent;  
        error.insertAfter(element);
    },

I want to get error content after jquery.validate function triggered. In the errorPlacement of the code blog as you see above error.get(0).textContent can provide msg in every browser except ie 8, I think this cause from JSON parsing problem in ie8, do you have any solution for this ?

  • 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-29T11:05:06+00:00Added an answer on May 29, 2026 at 11:05 am

    Use error.text() instead of error.get(0).textContent.

    When you call get(0) jQuery returns a DOM element at 0th index and IE8 do not support textContent property to a DOM element it has innerText property which is equivalent to textContent. If you call text() method on a jQuery object it will take care of cross browser issues and return the content correctly.

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

Sidebar

Related Questions

jQuery.validate errorPosition code : errorPlacement: function(error, element) { error.appendTo(element.siblings(label)); }, That code works brilliantly
I'm trying to use 'errorPlacement' from jQuery Validation DOCS : $(#myform).validate({ errorPlacement: function(error, element)
here is my code: groups: { phone: phone1-phone2-phone3 digits: true }, errorPlacement: function(error, element)
Greetings, I have problem with errorPlacement, I'm trying to place the error message next
Firebug is showing me the following: From the followin Validator initialization: $(#surveyForm).validate({ errorPlacement: function(error,
Going back to the errorplacement solution by Nadia ( jQuery override default validation error
I am trying to enable the next tab at the end of the function
I am trying to place the error message elements outside the FORM element which
How can I remove all default styling from error message? I need this document
I have a question about the errorPlacement Method in jQuery Validator Plug-in: I want

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.