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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:15:03+00:00 2026-05-26T13:15:03+00:00

I have a page with multiple forms within it. What I want is, obtain

  • 0

I have a page with multiple forms within it.

What I want is, obtain the form #, (eg second form is form #2) in which the end user has selected some text

I will use the form # to do some further operations on that specific form, using jquery and i need form # to be passed as parameter to the jquery calls that I have to make.

Is there some way to obtain this using jquery or javascript?

  • 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-26T13:15:03+00:00Added an answer on May 26, 2026 at 1:15 pm

    You can use the index() method to find the # of the form:

    var $form = $('#someFormId');
    var index = $('form').index($form);       //OR, equivalent:
        index = $form.index('form');
    

    Format:
      $element. index(selector)   (where $element is a jQuery object, and selector is a string which matches the collection to search in).
      $collection.index($element)   (where $collection is a jQuery object, representing all elements, and $element is either a DOM or jQuery object, representing the element to look for.

    Note: The parameter of the index() is very important. Have a close look at the documentation if you’re not sure about it.

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

Sidebar

Related Questions

I have a page that has multiple forms. Anytime the user clicks an input
I have a page with multiple forms on it. Each form has it's own
function GenKeyForm(FormNum){ document.GenNewKey+FormNum.submit(); } I have multiple forms within a php page. each form
I have a page which dynamically creates multiple forms, each form had a unique
I have multiple forms on a page, for each of them I want the
I have a overview page containing a list with some links from which multiple
I have an ASP.NET 3.5 page which has multiple span elements with ID containing
I have some code as such to submit multiple forms on my page at
So I have multiple forms on a page. Each form is identical except for
I have a php page. This has multiple images which looks like tabs. With

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.