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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:16:41+00:00 2026-05-23T00:16:41+00:00

I want to when entering in textarea imediately show me the submit button I

  • 0

I want to when entering in textarea imediately show me the submit button I can use

<input type="submit" id="submit" name='sub' value="Transfer" style="visibility: hidden" />

is there any solution with php or javascript?

Brettz SOLUTION:

<html>
<head></head>
<form>
<input type="submit" id="submit" name='sub' value="Transfer" style="visibility: hidden" />
<textarea id="mytextarea"></textarea>

<script type="text/javascript">
function addEvent (el, type, listener) {
    if (el.addEventListener) {
        el.addEventListener(type, listener, false);
    }
    else if (el.attachEvent) {
        el.attachEvent('on'+type, listener);
    }
    else {
        el['on'+type] = listener;
    }
}
addEvent(document.getElementById('mytextarea'), 'input', function () {
    document.getElementById('submit').style.visibility = 'visible';
});
</script>
</form>
</html>
  • 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-23T00:16:42+00:00Added an answer on May 23, 2026 at 12:16 am
    <input type="submit" id="submit" name='sub' value="Transfer" style="visibility: hidden" />
    <textarea id="mytextarea"></textarea>
    <script type="text/javascript">
    function addEvent (el, type, listener) {
        if (el.addEventListener) {
            el.addEventListener(type, listener, false);
        }
        else if (el.attachEvent) {
            el.attachEvent('on'+type, listener);
        }
        else {
            el['on'+type] = listener;
        }
    }
    // Change "focus" to "keypress", if you only want to show the button
    //  as soon as the user starts typing, rather than immediately 
    //  after they click into the textbox. "input" might be more appealing
    //  but this will not work in older browsers. See 
    //  http://help.dottoro.com/ljhxklln.php
    addEvent(document.getElementById('mytextarea'), 'focus', function () {
        document.getElementById('submit').style.visibility = 'visible';
    });
    </script>
    

    Notice I’ve added a textarea with the id “mytextarea”:

    …which you can of course change to your own name or needs.

    amolv’s solution is convenient for quick-and-dirty building of a page. But inline JavaScript (and inline formatting or CSS) is generally frowned upon for real applications, as it is cleaner for the structure of your page (the HTML) to be separated from the behaviors (typically JavaScript, though HTML5 is adding a <command/> element which could let you separate the behaviors in a special part of your HTML).

    Moving the scripts (and styles) to a separate page, also lets a browser cache (remember) the scripts without needing to reload it when the user visits another page at your site which might reuse the same code. Your server will therefore only need to deliver raw HTML (after the first download) without all the script text mixed inside, thereby speeding up delivery of your page content to the user.

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

Sidebar

Related Questions

I've a TextArea that I want to use for code input (xml). How do
I have an HTML textarea element. I want to prevent a user from entering
I want to use Ckeditor for Entering text and I want to save that
I want to enable a button only after entering text in textinput? How to
I want to simulate entering a string (can contain any character) in JTextField. I
i want to know if i can see place on map-MKMapView- by entering the
I want to be able to use select() to work with entering a single
i want to change the label value same as textbox while i entering a
I want to disable users from entering a character into a HTML text input
I want to create a Input Box for entering the private entering details of

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.