/    Sign up×
Community /Pin to ProfileBookmark

Dynamic Visible/Hidden Input Box

I am looking for some JavaScript code that I can place in an ASP to be used with Netscape. The JavaScript code must be executed when a specific selection is made in a pulldown box. Based on the selection, the JavaScript will then display a blank text box for input.

For example: On a Form generated by ASP, I have a pulldown box. The pulldown contains the following values:

A, B, C, D.

If B is chosen, I need a blank text box to become visible and available for input. Otherwise, the text box remains hidden.

Thanks in advance for your help.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisJan 27.2003 — [i]Originally posted by hilmesb [/i]

[B]I am looking for some JavaScript code that I can place in an ASP to be used with Netscape.[/B][/QUOTE]
What version?
Copy linkTweet thisAlerts:
@hilmesbauthorJan 27.2003 — Netscape Version 4.61.
Copy linkTweet thisAlerts:
@gil_davisJan 27.2003 — NS 4 will not allow you to hide parts of forms. You can either

  • 1. hide the whole form.


  • 2. split the form into many forms and hide one (real pain to put it all back together for submission).


  • 3. use document.write() to rebuild the form with the added field.


  • 4. make two documents - one with the partial form and one with the whole form.


  • 5. use the CLIP feature of a layer (hidden field must be last in form).


  • 6. give up.


  • Here is an example of 5:

    [font=monospace]<ilayer name="l1" height=100 clip=0,0,600,50 bgcolor="teal">

    <form name="MainForm" action="upload5.jsp" ENCTYPE="multipart/form-data" method="POST">

    <input type="button" value="check" name="btnCheck1" onClick="window.document.layers.l1.clip.bottom=75">

    <br>

    <input type=submit value=submit>

    <br>

    <input type="file" name="file1"

    </form>

    </ilayer>

    <p>More stuff[/font]
    ×

    Success!

    Help @hilmesb spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...