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 of forms on one page without a form name. Each
I have a couple of simple forms that send an html-only email. Most clients
I have a tab control on a form, and a couple different tabs have
I've seen a Yes/No form radio buttons value be stored/saved in a couple different
I have a couple of html forms inside of an Android app. To hide
i have a couple questions about an idea i have to manage a form
I have been looking at a couple html/css form frameworks like Uni-Form and Formy
I have a form with two combo boxes and couple of buttons. One of
I have a form which has elements in a couple of divs. Based on
This is quite the pickle... I have a regular HTML form with a couple

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.