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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:40:10+00:00 2026-05-14T16:40:10+00:00

I have a text area and the problem is people are typing a large

  • 0

I have a text area and the problem is people are typing a large amount of text and I have it clearing out the value and forcing an N/A so I can force something to be entered. How can I make the script below validate someone has already typed something (and not clear it out) but still clear out the N/A by default?

<textarea name="req_WhatMadeItDifficultToUse" cols="35" 
 onfocus="this.value = '';" 
 onblur="if(this.value == '') this.value = 'N/A';"   
 id="WhatMadeItDifficultToUse">N/A</textarea>
  • 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-14T16:40:10+00:00Added an answer on May 14, 2026 at 4:40 pm

    You can change this:

    onfocus="this.value = '';"
    

    To this:

    onfocus="if(this.value == 'N/A') this.value = '';"
    

    This way you’re only clearing it if it had the string N/A, this is how the search box on this page works, click it, watch search go away, type “search” in there, click out and back in…it’s just clearing if “search” was the term…perfectly acceptable behavior 🙂

    As an aside, is binding these events externally an option, or any sort of framework? Either would make your life much easier, but not sure if they are an option you have.

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

Sidebar

Related Questions

Hi I have a form with a text area for comments. The problem is
I have a text area and a function to do syntax highlighting on it.
I have a page which has a rectangular area with text and icons in
I'm having 2 problems. 1 - I have a text area in which I
I have a node with a text area editable with CKEditor. THis means my
I have a text area on my site which shows the user a certain
Right now I have a text area with autocomplete. When the autocomplete results come
Whenever any text is entered by user in text-area. it should be have in
I have saved input from a textarea element to a TEXT column in MySQL.
I have a form with a textarea. Users enter a block of text which

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.