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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:09:29+00:00 2026-06-08T12:09:29+00:00

Well, first start of with the code JavaScript: function keyevent(e) // submit key {

  • 0

Well, first start of with the code

JavaScript:

function keyevent(e) // submit key
{
    if (e.keyCode == 13) // 13 = enter key
    { 
        $(this).val("");
    }
}

 $(document).ready(function () {
     $('#send').click(function() {
         $('.message').val("");
     });
 });

HTML:

<input type="text" name="message" class="message" onKeyDown="javascript:keyevent(event);" />
<button name="send" id="send" onclick="refresh();" />Send</button>

Then I also have a if (isset($_POST[‘send’)) higher up on my page. But when I then see the message I sent, the messagebox is empty because the value of message didn’t exist.

So my question is, how do I “delay” the remove action? I have tried with delay()

  • 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-08T12:09:30+00:00Added an answer on June 8, 2026 at 12:09 pm

    Educated guess, what you need is this.

    Javascript:

    $(document).ready(function () {
    
      $('.message').keyup(function(e) {
        if (e.keyCode == 13) { 
          $(this).val('');
        }
      });
    
      $('#send').click(function() {
        refresh();
        $('.message').val('');
      });
    
    });
    

    HTML:

    <input type="text" name="message" class="message" />
    <button name="send" id="send">Send</button>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first experience with javascript, and... Well... Ugh. Here's what's happening: function
Well, first of all sorry about this question it must be pretty straight forward
well this is my problem i use 2 source first query (select * from
First, I don't know where to ask this question. Well this is programming QA
this is my first time asking a question here. I tried to be well
This is my first time playing with Active Directory, as well as the Ajax
This code give me this error: c.apply is not a function All code works
Well let me explain the code first: First the user enters the id, the
Current best practice is to use Environment.NewLine in your code to, well, start a
I have a particular function (well, set of functions) that I want to start

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.