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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:24:02+00:00 2026-05-27T13:24:02+00:00

my html: <html> <body> <input type=text id=name name=name placeholder=First Name /> <label for=name>First Name

  • 0

my html:

<html>
  <body>
    <input type="text" id="name" name="name" placeholder="First Name" />
    <label for="name">First Name </label>
    <button id="submit" src="images/button.png" width="100" >Submit</button>
  </body>
</html>

my script is:

<script type="text/javascript" src="jquery-1.5.2.min.js"></script>
<script type="text/javascript">                                         
  $(document).ready(function(){
    $('#submit').click(function() {
      var emptyTextBoxes = $('input[type=text],[type=password]').filter(function() { return this.value == "";
    });
    emptyTextBoxes.each(function() {
        $(emptyTextBoxes).nextAll('label').css({'display':'inline','color':'#F00'});
    });
  }); 

here once i entered values in the textfield i want to show message(form submitting) how can put that alert message here

  • 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-27T13:24:02+00:00Added an answer on May 27, 2026 at 1:24 pm

    Completely re-worked version which puts your input fields into a form and corrects errors in the original javascript…

    <html>
      <head>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
        <script type="text/javascript">
          $(function(){
            // use the id of the form (moved from the button)
            $('#submit').bind('submit',function(){
              // I added `input` in front of your password selector to make it more accureate/efficient
              var emptyTextBoxes = $('input[type=text],input[type=password]').filter(function(){
                return this.value == "";
              });
              // if there are no empty boxes
              if(!emptyTextBoxes.length){
                alert('We finally did it')
              }
              // this prevents the form from being submitted
              return false;
            })
          })
        </script>
      </head>
      <body>
        <!-- wrap with form and give form id -->
        <form action='#' method='POST' id="submit">
          <input type="text" id="name" name="name" placeholder="First Name" />
          <label for="name">First Name </label>
          <!-- replace button with submit input -->
          <input type='submit' width="100" />
        </form>
      </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<html> <body> <form action=login.do method=post> //..... <input type=submit value =send> </form> </body> </html> In
html : <div id='myform'> Name : <input type='text'/> Age : <input type='text'/> ..... <input
I wrote the following: <html> <head> </head> <body> <input type=date /> </body> </html> Just
Given this simplified snippet : <html> <body> <div> <div style='text-align:center;'>asdfaskjdfakjsd</div> <div style='float:right'> <input type='submit'
I have the following code : <html xmlns=http://www.w3.org/1999/xhtml> <body style=height: 1336px> <input type=hidden id=loadingtime/>
I've an HTML page like following: <html> <body> <div id=emaildiv class=main style=width:150px;height:80px;></div> </body> </html>
Here is my HTML code: <html> <head> <title>Login</title> </head> <body> <FORM NAME =form1 METHOD
I have written something like this in PHP <script type=text/javascript src=jquery.js></script></script> <script type=text/javascript> function
Hello here is my script: ARGV.each do |input_filename| doc = Nokogiri::HTML(File.read(input_filename)) title, body =
how can i convert xpath like /html/body/div[3]/ul/li[1]/a[5] html > body > div[3] > ul

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.