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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:37:16+00:00 2026-05-21T15:37:16+00:00

I have couple of forms with different ids but with same input names and

  • 0

I have couple of forms with different ids but with same input names and ids. For example:

<form id="form1>
    <input name="email" id="email" value="test@test.com"/>
     ..... 
</form>
<form id="form2>
    <input name="email" id="email" value="test@test.com"/>
     ..... 
</form>

And in my Jquery ready function I have below code. This works fine in FireFox, Chrome but not in IE7. That is alert function showing email value as “test@test.com” in FireFox, Chrome but IE7 showing as “undefined”. Any suggestions?

  $(document).ready(function() { 
        alert($("#form1 #emailAddress").val());
    });
  • 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-21T15:37:17+00:00Added an answer on May 21, 2026 at 3:37 pm

    Duplicate IDs are invalid, and I wouldn’t count on any selector filtering to work in the current, past, or future versions of jQuery. Those elements shouldn’t have ids, and they should be selected by name.

    e.g:

    $('#form1 [name=email]')
    $('#form2 [name=email]')

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

Sidebar

Related Questions

I have a couple search forms, 1 with ~50 fields and the other with
I have a couple of files containing a value in each line. EDIT :
I have a couple of solutions, but none of them work perfectly. Platform ASP.NET
I have a couple of controllers on my site which are handling form data.
My story is: I have a couple of forms in separately views that post
i have a input tag which is non editable, but some times i need
We have a form which has a few separate submit buttons which do different
We have a couple mini-applications (single Web form look-up stuff) that need to run
I have a form that I generate new input fields to with javascript and
I'll have couple of python functions I must interface with from the assembly code.

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.