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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:51:37+00:00 2026-06-05T21:51:37+00:00

I am creating one form in html using table. Which have one Drop down

  • 0

I am creating one form in html using table. Which have one Drop down box contains two values 1. Professor, 2. Librarian. Now each values have different form fields. If I select Professor some different fields show be displayed and if I select Librarian some different fields display.

Can anybody tell me how I can do this??

<table width="435" border="0"> 
  <tr> <td>VIsit Date </td> <td><input type="text" name="textfield" /></td></tr> 
  <tr> <td>Last Visit Date </td> <td><input type="text" name="textfield2" /></td></tr> <tr> <td>Call Type </td> 
         <td>
           <select name="title" size="1"> 
             <option value ="Pro"> Professor </option>
             <option value ="Lib"> Librarian </option> </select>
         </td>
  </tr>
</table>
  • 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-05T21:51:39+00:00Added an answer on June 5, 2026 at 9:51 pm

    Here’s how to do it in jquery, forget normal javascript.

    JQUERY CODE (PUT THIS IN THE HEAD PART)

    <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js></script>
    <script>
        $("#YOUR_SPECIFIC_ID").change(function(){
              if ($(this).val() == "Option2") {
                    $('.option1form').hide('');
                    $('.option2form').show('');
              }});
             </script>
             <script>
                 $("#YOUR_SPECIFIC_ID").change(function(){
             if ($(this).val() == "Option1") {
                                $('.option1form').show('');
                    $('.option2form').hide('');}});
    
    </script>
    

    Assign the select field an id:

    <select name="asia" style="width:233px;" id="YOUR_SPECIFIC_ID">
        <option value="Option1">Option1</option>
        <option value="Option2">Option2</option>
        </select>
    

    Then, you need to make the different forms for different selections.
    like this.

    <div class="option1form" style="display:none">
    <input type="text" name="example1_1">
    <input type="text" name="example1_2">
    </div>
    
    <div class="option2form" style="display:none">
    <input type="text" name="example2_1">
    <input type="text" name="example2_2">
    </div>
    

    Should work like this.

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

Sidebar

Related Questions

I'm creating one application in android to rotate an image using angle in html
I am creating one application in which i am using jsp/servlet.. I want to
I am creating a form using only HTML and JavaScript where I want to
I am creating one application with jquery.mobile-1.0a4.1 release. I have a page which is
I'm using Simple Form. I have a form for creating new items, and a
I was creating sixth form for a simple one digit user input and it
I am creating one web application using Spring and hibernate. I am little confused
I am creating one GUI in swing Java. I have to use one button
I am creating one sample project in android. i am using sample rss feed.
I have the next issue I'm creating one view when one button is touched.

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.