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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:56:38+00:00 2026-05-24T20:56:38+00:00

Is it possible in java script that when a text box control is populated

  • 0

Is it possible in java script that when a text box control is populated that it clears my list box and disables it and visa versa. I’m using ASP.net C# to bind the list box.

<asp:TextBox ID="_tx_Zip" On??? runat="server" Width="197px"></asp:TextBox>

<asp:ListBox ID="_lb_Zip" runat="server" Height="82px" SelectionMode="Multiple" Width="200px">

I was messing around with the OnTextChanged event but that’s no good. Sorry I’m trying to learn java script.

  • 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-24T20:56:39+00:00Added an answer on May 24, 2026 at 8:56 pm

    You can use onblur event of javascript and do like…

    <asp:TextBox ID="_tx_Zip" onblur="update();"
    
     function update() {
            if (document.getElementById('<%=_tx_Zip.ClientID %>').value != '') {
                document.getElementById('<%=_lb_Zip.ClientID %>').disabled = true;
                document.getElementById("<%= _lb_Zip.clientID %>").options.length = 0;
            }
            else {
                document.getElementById('<%=_lb_Zip.ClientID %>').disabled = false;
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to set a specific ID on an ASP.NET server control? Everytime
I am writing a server control that is a search box with suggestions (when
I have some html that creates a dropdown list. The list has text values
Assuming a regular <input type=text> text-box with data in it. Is it possible to
Possible Duplicate: Bind textbox to 'enter' key I have a search text box. I
I'd like a short smallest possible javascript routine that when a mousedown occurs on
I'm working on a Silverlight control that will allow multi-file downloading. At the moment
Is it possible to update an UpdatePanel manually using JavaScript or jQuery? What I
Say I have a textbox in HTML using the following code: <input type=text name=text
I have a fixed width div on my page that contains text. When I

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.