www.webdeveloper.com
Results 1 to 7 of 7

Thread: OnClick

  1. #1
    Join Date
    Jul 2010
    Posts
    9

    Question OnClick

    NEED HELP!
    how can I make a list menu appear when I select an option from a drop down list or menu??? Note: it appears automatically next the previous one or where ever we want!

  2. #2
    Join Date
    Mar 2010
    Posts
    2,803
    One way to do it is to put an onchange event handler on the select list that runs a function when a certain select option is selected.

    The function then changes the display style of the list menu container from none to block or the visibility style from hidden to visible.

  3. #3
    Join Date
    Jul 2010
    Posts
    9

    Smile

    @trina, I am new to javascript tips, if u could make an example of that!
    I appreciate that.

  4. #4
    Join Date
    Mar 2010
    Posts
    2,803
    Is this for some kind of school project/assignment or "real life" application?

    If you post the code you have so far then maybe I or someone else can try to help.

  5. #5
    Join Date
    Jul 2010
    Posts
    9

    Smile

    this is the code! so, when I select vegterian_food the another menu with name=vegterian_food appears next the main one "food_types"

    <form id="form1" name="form1" method="post" action="">
    <select name="food_types">
    <option>sea_food</option>
    <option>vegterian_food</option>
    <option>any_food</option>
    <option>any01_food</option>
    </select>
    <select name="vegterian_food" id="vegterian_food">
    <option>salad</option>
    <option>fish</option>
    <option>choice_00</option>
    <option>choice_01</option>
    </select>
    </label>
    <select name="sea_food" id="sea_food">
    <option>choice_01</option>
    <option>choice_02</option>
    <option>choice_03</option>
    <option>choice_04</option>
    </select>

  6. #6
    Join Date
    Mar 2010
    Posts
    2,803
    Is this for some kind of school project/assignment or "real life" application?
    You didn't anwer the above question, so I suspect your query is most probably some kind of school assignment and you're looking for someone to do it for you.

    I described generally how I would do it.

    Hopefully someone else will come along to actually write the code if that is what you want. Otherwise there are lots of examples on the www on how to do it.

  7. #7
    Join Date
    Jul 2010
    Posts
    9

    Smile

    Sorry, for not answering. It is a real life application!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles