Results 1 to 4 of 4

Thread: How to write drop down menu for Javasript

  1. #1
    Join Date
    Feb 2009
    Posts
    81

    How to write drop down menu for Javasript

    I have webpage fully developed under javascript now i have Main menus in the second table and for that i wanted to create the drop down menu how should i do that but make it sure that this will be also in Javascript. Please reply me ASAP.

  2. #2
    Join Date
    Jan 2009
    Posts
    125

    Re: How to write drop down menu for Javasript

    Lists of display text and their associated values need to be defined in the JavaScript domain, where you could select only one option. Refer below to the code in function selectOption. In that function, a selection is made programmatically by setting select's selectedIndex attribute to a zero-based number. When the "alert" button is clicked, a message pops up with the selectedIndex.

  3. #3
    Join Date
    Feb 2006
    Posts
    90

    Re: How to write drop down menu for Javasript

    In that function, multiple options are selected programmatically by setting each option's selected attribute to true or false. It is often usefull to be able to dynamically change the contents of these depending on some user action. With JavaScript and DOM interaction this is not a difficult thing to do. When the "alert" button is clicked, a message pops up with the selectedIndex. For a multiple select, that is the first option selected.

  4. #4
    Join Date
    Apr 2008
    Posts
    193

    Re: How to write drop down menu for Javasript

    I made some tests yesterday and I am able to reproduce the problem on wish. The problem accurs there are more than one call of the procedure. It is a good idea to name the form too so that it can be located within the DOM easily, the example form has been named drops. A drop down select list has been used to hold the choice of dynamic lists as this is easy to use in the later change script. It works fine but sometimes it returns only one/two rows. Then I call this procedure from sqlplus I get all requested records. The name attribute of this drop down has been set (to master) so that it can be easily found in the DOM.

Similar Threads

  1. How to add drop-down menu in Word ?
    By Japheth in forum Windows Software
    Replies: 21
    Last Post: 19-01-2013, 02:29 AM
  2. Java drop down menu
    By Ameeryan in forum Software Development
    Replies: 3
    Last Post: 05-11-2009, 01:33 PM
  3. How to add drop-down menu in Word ?
    By Japheth in forum Windows Software
    Replies: 0
    Last Post: 23-03-2009, 02:28 PM
  4. How to write code for Drop down Menu
    By StudyBoy in forum Software Development
    Replies: 3
    Last Post: 05-03-2009, 08:33 AM
  5. ListBox Drop down menu in vb.net
    By SamsherR in forum Software Development
    Replies: 3
    Last Post: 16-02-2009, 04:46 PM

Tags for this Thread

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
  •  
Page generated in 1,713,270,893.89647 seconds with 17 queries