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

  • Home
  • SEARCH
  • 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 7884561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:49:59+00:00 2026-06-03T04:49:59+00:00

I am using 2 input fields, the first is the true one, the other

  • 0

I am using 2 input fields, the first is the true one, the other will be hidden, just right behind it, using position:fixed; , when the user submits the form, there will be a Form Validation, if that original field is empty, the invisible input will show up, with a red background, with an alert message. this is working, by using .show() after it has had display:none; then I wrote another code in jquery, which makes this alert input go away, when the user clicks at it, means he’s trying to access back the original input so he can write in it, and this is working, by using .hide() ; the problem is, when I click submit again, the alert input isn’t showing up…again, in firefox; but it’s working completely good in IE.

Here is the HTML CODE:

 <div style="   padding-top:2px; overflow:hidden; float:left  ">
<div style="float:left; ">
<label for="email">
E-mail
</label> 
<br>
<div style="position:relative;">
<input class="inputtext" type="text" id="email" name="email" maxlength="32" style=" width:140px; height:15px;" tabindex=1/>
<input class="inputtext" type="text" id="emailnotification" name="emailnotification" maxlength="32" style=" width:140px; background-color: rgb(220, 20, 60); color: white; z-index:20; display:none; height:15px; font-weight: bold; position:absolute; left:0px;"/>
</div>
</div>

Now this is a part of the form validation function:

function validateForm()
{

    var xe;
    var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    var xemail=document.forms["signinForm"]["email"].value;
    if(xemail==null || xemail=="")
        {$("#emailnotification").val("Email is Required");  
        $("#emailnotification").show();

            xe=1;
        }
    else if (reg.test(xemail)==false)
        {   

            $("#emailnotification").val("Email is not Valid");
            $("#emailnotification").show();
            xe=1;
        }

now this is the jquery code which hide it back:

    $("#emailnotification").click ( 
function() { 
$("#emailnotification").hide(); 
$("#email").focus(); 
$("#emailnotification").blur(); 
});
  • 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-03T04:50:00+00:00Added an answer on June 3, 2026 at 4:50 am

    Works here in firefox

    Although I changed the code a bit…

    $("#emailnotification").blur(); is useless, since you focus elsewhere first.

    (I also used Rodolfo suggestion)

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

Sidebar

Related Questions

I need to clear the default values from input fields using js, but all
I am creating a page which dynamically creates input fields using jquery on the
I have 2 input fields and i am using it with a DatePicker like
I'm using the Datepicker in two input fields to allow users to select a
I am using Codeigniter framework and I have a form with input fields. When
I am using ASP.NET2.0. I have created a download form with some input fields
I'm trying to reset some input text fields, inside of a data table, using
How to make multiple forms with shared fields without using javascript? <input type=text name=username
I trying to create an HTML/CSS/JavaScript based list manager. I'm using text input fields
I have a web application that has set to navigate its input fields using

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.