Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Sep 2010
    Posts
    124
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Combo box enable disable

    hi again

    i have form with

    name
    age
    payment mode ( combo boxe include payment mode 1,payment mode 2 , payment mode 3)



    when i select a payment mode-01 enabbleling 5 combo boxes

    if slect payment mode 2 dissabling that combo boxes...


    how do i do this thing

    plzz give me sample code......................

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,096
    Thanks
    11
    Thanked 101 Times in 99 Posts
    moving to javascript....
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,171
    Thanks
    203
    Thanked 2,549 Times in 2,527 Posts
    I can see that your first language is not English, so in the interests of making yourself clear you would do best to avoid textspeak. I am not sure that I understand you too well, especially "enabbleling 5 combo boxes", but this may move you forward.


    Code:
    <select id = "pm" onchange = "reveal()">
    <option value = 0>Select Payment Mode</option>
    <option value = 1>Payment Mode 1</option>
    <option value = 2>Payment Mode 2</option>
    <option value = 3>Payment Mode 3</option>
    </select>
    <br><br>
    <div id = "mydiv1" style="display:none">
    <select id = "crdType">
    <option value = 0>Select Card Type</option>
    <option value = 1>Visa</option>
    <option value = 2>MasterCard</option>
    <option value = 3>American Express</option>
    </select>
    <div>
    
    <script type = "text/javascript">
    function reveal() {
    var p = document.getElementById("pm").value;
    if (p == 1) {document.getElementById("mydiv1").style.display="block"}
    else {document.getElementById("mydiv1").style.display="none"}
    }
    </script>

    "England are learning to walk before they can run with their feet nailed firmly to the ground". - Football commentator

  • #4
    Regular Coder
    Join Date
    Sep 2010
    Posts
    124
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Philip M View Post
    I can see that your first language is not English, so in the interests of making yourself clear you would do best to avoid textspeak. I am not sure that I understand you too well, especially "enabbleling 5 combo boxes", but this may move you forward.


    Code:
    <select id = "pm" onchange = "reveal()">
    <option value = 0>Select Payment Mode</option>
    <option value = 1>Payment Mode 1</option>
    <option value = 2>Payment Mode 2</option>
    <option value = 3>Payment Mode 3</option>
    </select>
    <br><br>
    <div id = "mydiv1" style="display:none">
    <select id = "crdType">
    <option value = 0>Select Card Type</option>
    <option value = 1>Visa</option>
    <option value = 2>MasterCard</option>
    <option value = 3>American Express</option>
    </select>
    <div>
    
    <script type = "text/javascript">
    function reveal() {
    var p = document.getElementById("pm").value;
    if (p == 1) {document.getElementById("mydiv1").style.display="block"}
    else {document.getElementById("mydiv1").style.display="none"}
    }
    </script>

    "England are learning to walk before they can run with their feet nailed firmly to the ground". - Football commentator
    Thankz alot for ur reply


  •  

    Posting Permissions

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