SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict Feudalism's Avatar
    Join Date
    Jun 2002
    Location
    Buenos Aires, Argentina
    Posts
    361
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question on change ; > 1 { visibility

    I have two text inputs. The second input is "visibility hidden".

    I need to have it visible when the first input value is changed to something that is > 1.

    Thanx!

  2. #2
    SitePoint Enthusiast Kisan's Avatar
    Join Date
    Jun 2003
    Location
    India
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this out:
    Javascript code:

    Code:
    function checkthis(thisfield){
    var fldval=thisfield.value;
    if (fldval>1)document.getElementById('bb').style.display="";
    }
    html code

    Code:
    <form action="aa" method="POST">
    <input type="Text" name="aa" id="aa" onBlur="checkthis(this)"><br>
    <div id="bb" style="display:none;"><input type="Text" name="bb"></div>
    </form>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •