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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:45:45+00:00 2026-06-05T23:45:45+00:00

Scenerio: I have some divs populated through foreach loop like below <div id=div1><input type=hidden

  • 0

Scenerio: I have some divs populated through foreach loop like below

<div id="div1"><input type="hidden" value="1"></div>

and I am populating couple of divs with div(1,2,3) as id and hidden input field with same ids

In my jQuery/Ajax call I am doing like below

$.ajax({
                type: 'get',
                url: 'URL to Server',
                data: 'id=' + $("#div"+ here I want to get the id of input tag);

For example if I want to get the id of input filed with id="2" how can I get it ?

  • 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-05T23:45:47+00:00Added an answer on June 5, 2026 at 11:45 pm

    if i am getting you right then you should do like this

    data: 'id=' + $("#div2 input").attr('id')

    $("#div2 input") will give you nested input field

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

Sidebar

Related Questions

I have a collection of div's which I need to remember and loop through,
I have some scenario like below : /** * @ORM\Entity * @ORM\Table(name=role) */ class
Consider the scenerio when I have typed: file.f When I type Ctrl-X Ctrl-O the
I have some scenario like this: Product-> Platform-> mylibs(version-1) Product-> mylibs(version-2) i.e Product uses
I have a loop like: String tmp; for(int x = 0; x < 1000000;
I have a form with many hidden divs and a select for showing a
We have some configuration issues that we would like to solve by putting in
Scenario: I have some @Statefull bean for user session (not an HTTP session, it
I have some queries with following scenario on github. consider there is one organization
I have the following scenario (C#, WinForms). I have some kind of project file

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.