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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:02:43+00:00 2026-05-31T10:02:43+00:00

Im trying to hook up some validation for a site that im doing …

  • 0

Im trying to hook up some validation for a site that im doing … i have to admit, im not a jquery ninja.

So what i have done is taken validation from another site and added it to my site but it doesnt seem to be working.

My HTML is as follows

<label for="yourname">Your name</label>
<input type="text" name="yourname" id="yourname" /> <span class="error" style="width: 180px;"></span>

and a small fraction of the jquery that im using to validate is as follows:

if(!isString($.trim(iName.val()))){
    iName.siblings('.error').text('Please enter your name.');
    error = true;
}

The bit that its getting stuck on it the siblings bit … when i run the code, it puts the error text behind every .error span on the page, where its only meant to put it on the .error span behind the current element.

Any help would be great.

Cheers

  • 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-31T10:02:45+00:00Added an answer on May 31, 2026 at 10:02 am
    iName.next('.error').text('Please enter your name.');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently trying to hook up jQuery UI dialog so that I may
I'm trying to us the theme hook the style some checkboxes. I have used
I'm trying to hook up the click event on a jQuery image carousel's images
I am trying to add a post-commit hook to a bare repository, such that
I'm new to using callback functions and struggling trying to hook some up through
I'm trying to create a hook in one Wordpress plugin that could be used
I am trying to develop a util (using system-hook) for that works like an
I'm trying to set up a git post-receive hook such that when a commit
I'm trying to hook up a blog with some xml namespaces and xml stylesheets.
I've been trying to find some tutorials on writing hook scripts, and so far

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.