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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:41:18+00:00 2026-06-14T19:41:18+00:00

I writing a simple page to check if someone is entering the correct email

  • 0

I writing a simple page to check if someone is entering the correct email twice. I want to display in another element on the page weather or not the email in the second form block is the same as the first. I’m using the jquery id selector.

<head>
<script type="text/javascript" src="jquery1.8.3-min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">


    function emailCheck(){
        if($("#email").val() != $("#email2").val())
        {
            $("#err").innerText = "emails don't match, sucka";
            $("#test").textContent = "emails don't match, sucka";
            $("#test2").innerHtml = "emails don't match, sucka";
            document.getElementById("getEleTest").innerText = "emails don't match, sucka";
            alert("dont match");
        }
    }
</script>
</head>

<body>
<form action="SignUp" method="POST">
    <table>
        <label for="email">Email</label></br>   
        <input id="email" type ="email" name="email1111"/> </br>
        <label for="email2" > Enter Email Again </label></br> 
        <input id="email2" type="email" name="email21111" onkeyup="emailCheck();"></br>
        <input type="submit" value="Sign Up">
    </table>
</form>

<div id="err"></div>
<div id="test"></div>
<div id="test2"></div>
<div id="getEleTest"></div>
</body>

In all cases I don’t receive any text in the elements I am err, test, and test2 elements but i do get an alert window and there is text in the getEleTest element. What could be going on here. I don’t get any errors in the firebug console, the jquery is getting the ’email’ and ’email2′ elements. I’ve checked that I am linking the jquery script properly and just in case I haven’t I added the google jquery source. Thanks

  • 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-14T19:41:20+00:00Added an answer on June 14, 2026 at 7:41 pm

    Put all the jQuery stuff in $(document).ready(function(){ //your code here });

    EDIT 2: I had a typo in my JS code. You were mixing regular JS with jQuery.

    Why not write something like this?

    $(document).ready(function(){
        $("#signUpForm").submit(function(evt){
            if($("#email").val() != $("#email2").val()){
                $("#err").html("emails don't match, sucka");
                $("#test").html("emails don't match, sucka");
                $("#test2").html("emails don't match, sucka");
                $("#getEleTest").html("emails don't match, sucka");
                alert("dont match");
                evt.preventDefault();
            };
        });
    });​ 
    

    and add id = “signUpForm” atribute to form? Also you need to remove inline JS from your HTML so your input doesn’t have onKeyUp event.
    You can see my example here.

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

Sidebar

Related Questions

I'm writing simple filter in Android and want to use ExpandableListAdapter with check boxes.
So I'm writing a simple page that I want to be able to slide
I'm writing a simple script to build a HTML page to check if all
I am writing one simple page in APS.Net with VB.Net as the scripting language.
I'm writing a simple class in C++ for a class (school, not code). I
I'm writing a simple App Engine app. I have a simple page that allows
i have question... iam writing simple html page with little bit of css. EVERYTHING
I'm writing a simple web page that displays a table. It the right column
I'm writing a simple asp page to show a team rota based on some
I'm writing a simple web page using responsive web design, so CSS3 media queries

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.