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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:34:23+00:00 2026-05-23T00:34:23+00:00

I am trying to create a dynamic selector and dump view the resulting object

  • 0

I am trying to create a dynamic selector and dump view the resulting object in the console log:

console.log($('input:first[type=hidden][id$='+ temp +']').parent());

translation: get the parent of the first input which is hidden and where the id ends with ‘temp’

temp is a var that is passed into the function where this statement lives. When I take out the + temp + and replace it with say… 50 (a known number) – I get the result I am looking for. When I try to get the selector to print dynamically, I get an empty result. I have searched and searched for a solution but cannot find a solution.

Thank you for your help!

EDIT:

function removeAjaxContact(aid)
{
    console.log(aid);
    console.log($('input:first[type=hidden][id$='+ aid +']').parent());
}

console result:

`40

[]`

SELF ANSWERED:

OK – figured it out… I passed the value into from the page as a string instead of an int. not sure why that made the difference, but it did. thank you all for your quick reply and support!!

  • 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-23T00:34:24+00:00Added an answer on May 23, 2026 at 12:34 am

    (Stated above in an edit): OK – figured it out… I passed the value into from the page as a string instead of an int (encapsulated in quotes). not sure why that made the difference, but it did. thank you all for your quick reply and support!!

    Update, I have run into this problem in passing other values too, passing an int will randomly lead to getting a lower number in the actual function. I am a little green do diagnose why this is happening. Thanks to you all for the instant help and support!

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

Sidebar

Related Questions

I'm trying to create a dynamic module where I drop an object on screen.
I'm trying to create a dynamic popup window that is able to be re-sized.
I am trying to create a new contact using Dynamic Entity. The sample i
I'm trying to create a linq query based on some dynamic/optional arguments passed into
Trying to create a user account in a test. But getting a Object reference
Trying to create my first iPhone app that would play back audio. When I
Trying to create a list to return some JSON data to a view. Following
I'm trying to select the id's of dynamic input fields in my code. When
I'm trying to create dynamic balls by using a for loop. For some reason
I'm trying to create dynamic graphics for my game, which I'm building with Cocos2D.

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.