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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:15:02+00:00 2026-06-07T16:15:02+00:00

I would like most of my text boxes in my web application to display

  • 0

I would like most of my text boxes in my web application to display a hint to minimise clutter on the screen.

I have come across many solutions but all of them seem so complicated for what I want. It may be worth pointing out now that my Javascript knowledge is quite poor.

All I need is a simple script that will allow me to have text box hints (with a CSS style so I can make it greyed out and italic) and that will work with a password field.

I did have a script but it only allowed me to have one password field per page and it wasn’t very easy to use everywhere.

Thank you, your help is greatly appreciated.

EDIT: This also needs to be compatible with IE6 unfortunately.

  • 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-07T16:15:04+00:00Added an answer on June 7, 2026 at 4:15 pm

    The safest way would probably be to create two password boxes for instance and the one with text in you do as following:

    <input style="color:#B0AEAE;width:167px;display:none;" id="password_text" type="text" value="Password" />
    <input type="password" id="password_password" name="password" style="width:167px" maxlength="20"/>
    

    Then you first hide the “normal” password input field with (I use) jquery and display the hidden password field and you can on click go back to the other one like this:

    $(document).ready(function() {
    
    $('#password_text').show();
    $('#password_password').hide();
    
    $('#password_text').focus(function() {
        $('#password_text').hide();
        $('#password_password').show();
        $('#password_password').focus();
    });
        $('#password_password').blur(function() {
        var password = $(this).val();
        if(password == '') {
            $('#password_password').hide(); 
            $('#password_text').show();
        }
    });
    

    });

    Just put this at the top:

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to display Arabic text in my Android application. I am developing
I have cloned ~60 git repositories and I would like to update the most
I have a list of checkboxes like you would see in most email clients
I have a large text file I would like to put on my ebook-reader,
I have a SVG which contains text within a rectangle . I would like
I have a large block of text, and I would like to find out
I have a form with a full-name text field and I would like to
I would like to get the most out of working in cch or tcsh
I would like to ask you what's the most efficient way for checking user's
I am running a php website and would like to pull in the most

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.