FAQ Database Discussion Community


How can I Add sub menus to dropdown menus?

html,css,drop-down-menu,menu,submenu
I am having extreme dificulties to add a sub-menu to my dropdown, but I am not a pro on css. I would like to put a submenu on the part it says "10º ano" and "11º ano" in the dropdown "projects", but everything I do doesn't work ! How can...

Loop through all the elements of select and add a blank option if the either of the items is null

javascript,jquery,drop-down-menu,dropdownbox
I have 2 drop downs select1 and select2. I will select the item1 of select1 and then click OK button ( case in which I need help) then if the selectedindex is 0 ( ie first option )then loop through the items of both drop downs. if the same index...

Dropdown closes after every click

javascript,html,css,drop-down-menu
Dropdown closes after every mouse click. The dropdown should close only after hitting the "Close (X)" button. How can I do that? Plunk: http://plnkr.co/edit/7mcBoyfbrT3FNl2vJLjh?p=preview <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="style.css"> <script src="script.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>...

Bind a Dropdown in Gridview When Selected Index Changes on Dropdown in the same Gridview

c#,asp.net,gridview,drop-down-menu
I have a gridview with template fields consisting of dropdowns and textboxes. 1 dropdown will be a so-called "master" dropdown that when the selected index changes, other dropdowns in the same row will be databinded using the selected value of the master dropdown. I have this code for my ASPX...

Adding

php,drop-down-menu
I'm trying to get my select option to show the selected category from my DB in the dropdown. I can only get it to show it, when i hit my submit button. <?php (isset($_POST["kategori"])) ? $kategori = $_POST["kategori"] : $kategori=1; $sql = "SELECT * FROM kategori" $result = mysqli_query($db, $sql);...

How to show unique key exception before saving into database?

c#,asp.net,gridview,drop-down-menu
I've created a gridview in which user can enter items and their quantities. The number of items are unknown so the requirement was that to able to add as much items the users want to. So I've given a provision to add item row for another entry. All these data...

jquery tabbed selector with dropdown selectors, dropdowns don't match on tab switch

javascript,jquery,css,drop-down-menu
Thanks to help from members oka and Mike Robinson, I have managed to build two tables that users will view and play with using tabs and dropdowns. My two tables have identical structures, each has an identical drop-down menu to show/hide columns. The idea is for the user to select...

How can I add a Submenu to the WordPress Admin Bar

php,wordpress,drop-down-menu,menu,admin
I need to add a dropdown menu to Wordpress in the admin bar to include multiple links. What is the best solution?

How do I clear a form and reset a drop down menu to the first option?

javascript,drop-down-menu
I have a form that has text fields, a drop down menu, radio buttons, and check boxes. I was able to clear all of the input entered by a user but now I need to modify the form so that when the user clicks "Clear Entries" all of the above...

How to change content in div, based on dropdown selection

php,html,mysql,drop-down-menu
I load my content from my DB with PHP, into my div. I have a dropdown above it, where i should be able to sort out the content, meaning that when dropdown is chosen, the old content in the div is removed, and the new appears. So how is it...

Create interdependent dropdown list

php,jquery,mysql,drop-down-menu,mysqli
I am trying to create two inter dependent dropdown menu. There are 2 tables category and subcategory their structure is given below category table id catname 1 A 2 B Subcategory table id subcatname catid 1 S 1 2 T 1 3 U 2 In the first dropdown i have...

Making “Drop Down Menu” and “Head Menu” relative does not make de “Drop Down Menu” push down the “Head Menu” on hover

jquery,html,css,drop-down-menu
So again I am strugling with some problems. This time it is so that when I hover over the drop down menu from portfoilio (when the site is in mobile view mode) it will just go over the other elements, I tried making everything relative, removed the float and tried...

CSS dropdown menu cross-browser

html,css,drop-down-menu,cross-browser
My CSS dropdown menu behaves strange in different browsers. It works fine in Chrome (Windows) but there are issues in Firefox and on Android. Firefox: Dropdown menu opens up to the right of the menu item instead of below. Also, the dropdown menu is not in line with the menu...

Dynamically select from a dynamically generated dropdown

php,html,select,drop-down-menu
I have a dynamically generated dropdown list - list of course identifiers and names. On the basis of a variable, “assigned_course_id”, I would like to preselect the appropriate value from the dropdown list. My best attempt is as follows. Thanks in advance for your assistance. <select name="course_id" id="course_id"> <?php $assigned_course_id...

Replace li navigation menu text with image & keep hover + drop down menu effects?

html,css,image,drop-down-menu,css-menu
I'm currently working on a navigation menu that uses <li> to construct the bar. Currently, my menu is working perfectly but I'm wanting to actually REPLACE the text on my menu (i.e. Projects, Compliance, Summary, etc) with actual image buttons that I designed in Photoshop to give it a more...

Option Menu Not Working When I Add Javascript Function

javascript,jquery,html,css,drop-down-menu
I need help with an option menu not working when I add javascript. I found a tutorial for this type of drop-down menu and the menu/drop-down function is working except I can’t get it to do what I need when an option is selected. When "Not Free" is selected I...

validating mutiple drop downs list with the same name field in CakePHP 2.x

cakephp,drop-down-menu
I'm new to cakephp 2x. I have multiple drop down in my form. All the drop downs are using same list data, from one table called -> Students. Now what I want is ,when the user select first student in first drop down ,then that student should be minus from...

Style select box drop-down menu like a table

javascript,css,table,select,drop-down-menu
i am using a select box in my codes which contains 50 options, by default when i click on it, drop down menu appears like below: <select name="Select1" style="width: 56px"> <option></option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> but i want it to appears like a table i tried some CSS...

Drop down list with possibility to enter new value instead of list

javascript,php,mysql,database,drop-down-menu
I'm creating a small website php/mysql. Let's say I have in my DB a table with different laptop specifications (brand, cpu, ...). When adding a new laptop in a html form, in the brand field for instance, I want to have the option to see all the distinct brands present...

Bootstrap 3.3.4 Pill Button Dropdowns unresponsive

html,twitter-bootstrap,drop-down-menu
Prototyping a categorical classification system, I'm using Boostrap dropdown buttons in a pill-style navigation. I'm not committed to the pills, so if a different class such as a navbar might work instead, I'll change, though I did already try using navbar and button groups. I don't know for sure that...

On dropdown click, close all other dropdowns

javascript,jquery,html,css,drop-down-menu
When I click on top menu link "menu item 01" 3 level drop down open regularly it is OK, After that click on "menu item 04" mega menu is open it is OK BUT I want, when user click on any other top menu link previous all drop down item...

Drop-Down Menu PHP

php,mysql,drop-down-menu
I have this html code for a menu with sub-menu: <li class="has-submenu"> <a href="#">Services</a> <div class="mainmenu-submenu"> <div class="mainmenu-submenu-inner"> <div> <h4>Home</h4> <ul> <li><a href="#">Plumbers</a></li> <li><a href="#">Painters</a></li> </ul> <h4>People</h4> <ul> <li><a href="#">Babysitter</a></li> <li><a href="#">Trainer</a></li>...

Getting value of drop down list JavaScript

javascript,drop-down-menu
How to make that the all selected options, not the values, but the actual text, would be displayed somewhere? Html: <h1>Made your PC:</h1> <div> <label>Processeor: </label><select id="processor" name="processor"> <option class="label" value>Select Processor</option> <!-- Home Ware --> <option value="P1">Processor 1</option> <option value="P2">Processor 2</option> <option value="P3">Processor 3</option> <option value="P4">Processor 4</option>...

Cannot populate a DropDownList in EditItemTemplate using OnRowCommand

c#,asp.net,drop-down-menu,edititemtemplate
This is my code behind code. I want to populate the DropDownList once the user clicked edit but the DropDownList I'm getting is null. Why? protected void SupportSchedule_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "EditRow") { int rowIndex = ((GridViewRow)((ImageButton) e.CommandSource).NamingContainer).RowIndex; GridViewRow row = (GridViewRow)(((ImageButton) e.CommandSource).NamingContainer); SupportScheduleTable.EditIndex = rowIndex;...

How can I populate dropdown values dynamically based on prior selection?

javascript,object,drop-down-menu
I have 3 dropdowns with some values. I am using JavaScript to pre-populate the first dropdown. Based on the selected value in 1st dropdown, how can I populate values in the rest 2 dropdowns (using pure javascript)? I am framing a URL based on the user selected values in 3...

Is it possible to insert a menu item at a specific position in Dijit using Dijit/Menu

javascript,drop-down-menu,dojo
I have a menu whose contents need to change significantly based on user interaction. This means that some new menu items need to be introduced, and some need to be removed. Looking at Dojo's published API documentation, there doesn't seem to be a way to redo a menu's contents without...

Chain populate HTML select boxes using AJAX, PHP and MySQL

php,jquery,mysql,ajax,drop-down-menu
My special form has two select boxes. I got the first one populate with options from a MySQL database using PHP, during page loading stage. What I'm trying to achieve next is the following: By selecting one of the values from first pre-populated <select> box - the second <select> box...

Bootstrap dropdown selection makes screen jump

javascript,html,css,twitter-bootstrap,drop-down-menu
So I'm using bootstrap for my website and I have many div's on each page with a dropdown on each that change the information inside the div from a chart to a table and vise-versa. This works fine except when the user selects an option from the drop down the...

Excel, Want to Create Dropdown Based on a “yes” Cell

excel,drop-down-menu
The issue is pretty simple, but I can't seem to solve it or find an answer. I have one cell A2 that activates with a yes/no based on what the user enters elsewhere. I would like to create a drop-down list in another cell A3 only if A2 has a...

Google chart redraw onclick

javascript,jquery,drop-down-menu,charts,google-visualization
I am trying to make a chart from which the data is selectable through various dropdown menu's and a date selector. I can't seem to find a way to pass new data in the chart on a click event. I got it working so far that onClick, it draws an...

Hover not working on css menu active li class? Works on others?

html,css,drop-down-menu,menu,hover
I can't seem to get the hover to work on my very first css menu navigation button. It is an active li class, does anyone have any ideas? The other menu option' hover effect is working just fine. CSS code: @import url(http://fonts.googleapis.com/css?family=Open+Sans:600); /* Menu CSS */#cssmenu, #cssmenu > ul {...

CSS-based menu bar inside a table: li's are 1px off; problems with the table border?

html,css,css3,drop-down-menu
Edit: The target browser is IE10 or higher; no need for compatibility to other browsers. Inside the header of a page I have 3 elements (this is also the order): An application logo The application title A CSS-based menu bar Here is a JSFiddle for those who can't wait ;)...

Button Click Moves Entire HTML Body

jquery,html,css,button,drop-down-menu
I have a very basic webpage-setup that includes a drop-down menu that is triggered by a button click. When I click on the button, the drop-down menu reveals itself but also shifts the entire contents of that page. I'm not sure what is causing this and would appreciate any help....

onClick event for dropdown list meteor javascript

javascript,events,drop-down-menu,meteor
is there a way I can add a click event to a dropdown menu in Meteor? I know how to do it for buttons, but I couldn't find documentation for dropdown menus. My dropdown menu is: <td> <select id="orderStatus"> <option value="Submitted">Submitted</option> <option value="Sent">Sent</option> <option value="Complete">Complete</option> </select> </td> I want an...

Drop-down menu not working in chrome

css,google-chrome,drop-down-menu,z-index
I'm having issue with my drop-down menus on both windows and mac versions of chrome. I tried some fixes out there but I can't figure it out. Any advice would be great! I think there is a z-index issue, but I can't figure out where it is. Here is the...

Get a specific value from a specific array when having two dropdown lists

c#,arrays,drop-down-menu
I have 5 arrays which represents 1 city each. Each position in the array represents the distance to another city (all arrays shares the same position for each specific city). And I have two dropdown lists from where the user is supposed to select two cities to calculate the distance...

Can't set headings for every column in dropdown menu

html,css,drop-down-menu
I have a dropdown menu in a template that I got online. Here is the code for the dropdown menu: <!-- mega-menu start --> <li class="dropdown mega-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Clients</a> <ul class="dropdown-menu"> <li> <div class="row"> <div class="col-lg-8 col-md-9"> <h4>Customers</h4> <div class="row"> <div class="col-sm-4"> <div class="divider"></div> <ul class="menu"> <li><a href="page-about.html"><i...

Wordpress mobile menu not toggle (slide up) by clicking anywhere in the screen

javascript,jquery,html,wordpress,drop-down-menu
When I click on toggle button in mobile menu then only its work perfectly like slide up and down the menu but when I click anywhere on screen then it will not slide up. I want to slide up menu when click anywhere on screen. I used below code but...

Show/Hide
Based on