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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:54:12+00:00 2026-06-11T15:54:12+00:00

I have an input – <input id=post_name type=text value=123 name=post_name> This input is contained

  • 0

I have an input –

<input id="post_name" type="text" value="123" name="post_name">

This input is contained within a <div> that is hidden when the page loads, and jQuery will not retrieve the value of the input –

var current_name = $('input[name="post_name"]').val();

I can read the rest of the object, and get attirbutes such as name and id, but the value is eluding me. Is this a jQuery bug, or am I missing something?

  • 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-06-11T15:54:13+00:00Added an answer on June 11, 2026 at 3:54 pm

    The answer here is depressingly simple – I accidently duplicated to ID and name that I was using for the input earlier in my code, so it was that which was being picked up by the jQuery.

    The lesson I’ve learned – don’t be a donut! And check your code to ensure that selector IDs and input names are not duplicated.

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

Sidebar

Related Questions

I have input text: <div><label wicket:for=name>Name</label><input type=text wicket:id=name /></div> Now I need to add
I have input checkbox something like this.. <input class=inputchbox id=Pchk type=checkbox name=check value=<%=Model.ID%> />
I have input with either some given or empty data-file: <input type=text value=path/to/file.gif name=some_file
I have input <input type=hidden value=Select Value 11121 DataValue name=111 id=222/> I select value
I have input in HTML-page: <input id=Name name=Name tabindex=0 type=text value=Name: /> I wrote
I have input field <input type=text name=vehicle_make[] id=make1/> and i have help dropdown that
I have input text that contains a ' like in this text Frank's Reel
Assume you have input element: <input id=aaa type=text value=unchanged /> Then launch js script:
For ex: I have input with this value: (099) 123 45 67 I want
I have this input text and an input button...I am looking to have them

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.