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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:26:40+00:00 2026-05-30T10:26:40+00:00

How would I run a check after a keypress function to see if an

  • 0

How would I run a check after a keypress function to see if an inputs value was empty so I can do another action.

For example.

    $("input[name=amount]").keypress(function() {
        $("table[name=apply]").show();
    });

I want to hide the table if the user deletes all the keystrokes.

  • 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-30T10:26:41+00:00Added an answer on May 30, 2026 at 10:26 am
    $("input[name=amount]").keyup(function() {
        if (this.value == '') {
            $("table[name=apply]").hide();
        } else {
            $("table[name=apply]").show();
        }
    });
    

    You will probably want to use either the keyup or change event so the value of the text-box has changed before the event handler runs. The keypress event fires before the value of the input has changed, so for instance if the input is blank and a key is entered, the value in the event handler would still read as blank.

    Here is a demo: http://jsfiddle.net/jasper/C5KPq/

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

Sidebar

Related Questions

How would I run both of them under one main website, say www.example.com, which
I would like to know, how to run something after the jQuery load? Does
I would like to write an app which can be run on iOS 3.1.3
I'm curious if anyone knows how I would trigger a function to run if/once
Which query would run faster? SELECT * FROM topic_info LEFT JOIN topic_data ON topic_info.id
I would like to know how you would run a stored procedure from a
I am wondering if I would run into troubles when setting the heights of
I'd like to create an application that would run on Google's appengine. However, this
How would you run the Selenium process (thread) from a Java process so I
I would like to run multiple copies of my application and force the first

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.