FAQ Database Discussion Community


ASP-DropDownList CodeBehind images

html,asp.net,image,drop-down-menu
All I ever wanted is my DropDownList to be special. :( I can write just names, but that won't be as intresting. So I tried to add images, like so: // Somewhere in the code... ListItem item = new ListItem(); item.Value = // something item.Text = "<img src=\"" + <AnImagePathIGetFromTheDatabase>...

DropDownList is not working properly when bound to database and add item manually

asp.net,c#-4.0,drop-down-menu,oracle11g
I have created one webpage in ASP.net C# front end and Oracle 11g back end. Webpage consist of 2 DropDownList, button and GridView. Among these 2 DropdownLists, DropDownList1 contain static value "QC Released" added through ListItem Collection Editor and other DropDownList2 is bounded to database. However, in DropDwonList2 I have...

how to hide a div from a selected value in dropdownlist asp.net mvc

asp.net,model-view-controller,drop-down-menu
i need help. So i have a dropdownlist(below), @Html.DropDownListFor(model => model.Reference, ViewBag.ISharedUI as SelectList, "-- REFERENCE TYPE --") @Html.ValidationMessageFor(x => x.reftab) and i have 2 div which are(below) <div class="widgetbox" id="divone"> Some contents </div> and <div class="widgetbox" id="divtwo" style="visibility:hidden"> Some contents </div> So what i need to do is, to...

Show/Hide
Based on

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);...

Symfony2 trouble passing data into form dropdown

php,symfony2,drop-down-menu,doctrine2,symfony-forms
I am learning symfony, I am stuck on this problem for hours now. I am trying to get userIDs from FOSuserbundle into my own form's Dropdown. but unable to succeed.. am doing something wrong with the __construct function I guess.. here's the code ShiftType.php: class ShiftType extends AbstractType { protected...

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>...

Dropdown submenu is not displaying correctly

html,css,drop-down-menu,menu
If I hover on the first item (USA), it is OK. When I hover next item, it is displaying on the top. It isnt on the same position as "Europe". Here is a CSS: nav ul li:hover ul li ul{ position:absolute; display:none; } nav ul li:hover ul li:hover ul{ display:block;...

Dynamically change a button-drop list in javascript?

javascript,jquery,twitter-bootstrap,button,drop-down-menu
Trying to create a changeable button-drop-down from Bootstrap HTML in conjunction with Javascript. The HTML looks as: <div class="btn-group"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> Menu <span class="caret"></span> </a> <ul class="dropdown-menu"> <li><a href="#">Choice1</a></li> <li><a href="#">Choice2</a></li> <li><a href="#">Choice3</a></li> <li class="divider"></li> <li><a...

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...

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...

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...

How can I make a “*required field” error message appear for a drop down menu in a validating PHP form?

php,forms,validation,drop-down-menu,server-side
I created a form using PHP. The form needs to be validated and it works for every field but the "rate our site" drop down menu. I'm using the same code from the form from other questions (name, email, etc.) for the "rate our site" drop down menu but the...

Filter Two Dropdowns Based on One Another the Angular Way

javascript,html,angularjs,select,drop-down-menu
I've got two dropdowns. The allowable options in those dropdowns should be filtered based on what's in the other dropdown. Here's the first dropdown: <select ng-model="filter.levelPregenerate"> <option value="">All</option> <option value="assox">Associate's</option> <option value="bachx">Bachelor's</option> <option value="mastx">Master's</option> <option value="doctx">Doctorate</option> <option value="nondx">Non-Degree</option> <option...

change css dynamically by selecting dropdown list item

jquery,html,css,drop-down-menu
I have the following Dropdownlist with yes or no options-:` <asp:DropDownList ID="ddlchangecss" runat="server"> <asp:ListItem Text="yes">yes</asp:ListItem> <asp:ListItem Text="no"></asp:ListItem> </asp:DropDownList> i want to add a css dynamically like that-: .imgFullWidth { width: 100%; height: auto; float: left; margin: 0px 0px 20px 0px; } when I select yes option in Dropdownlist. How can...

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...

Multiple instances of Jquery dropdown not working together

jquery,html,drop-down-menu
I found the following code in another thread here to create a Jquery dropdown menu: $(document).ready(function() { $('.statecontent').hide(); $('#' + $('#myselector').val()).show(); $('#myselector').change(function(){ $('.statecontent').hide(); $('#' + $(this).val()).show(); }); }); HTML would look like this <select id="myselector"> <option value="state1">State 1</option> <option value="state2">State 2 </option> <option value="state3">State 3</option> </select> <div id="state1"...

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...

How can I find get attribute of a select tag where value = something using jquery?

jquery,select,drop-down-menu,html-select
How can I get the price attribute's value where #products.option value = 6. <select id="products"> <option value="2" price="60.00">Product 1</option> <option value="4" price="40.00">Product 2</option> <option value="6" price="40.00">Product 2</option> <option value="8" price="40.00">Product 2</option> </select> ...

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 {...

Remove Specific Value from DropDown

c#,list,drop-down-menu,remove-if
I am beginner to the dot.net, can any one suggest me how to remove specific value in fetched dropdown list. Here why I am mentioning fetched means that dropdownlist is generated from or fetched from a table using sql. sqlquery=SELECT DISTINCT rtrim(ltrim(C.Cust_name)) as Cust_name FROM table1 A inner join table2...

DropDownChoice onSelectionChnaged

java,drop-down-menu,wicket
DropDownChoice<Bean> groupDDC =new DropDownChoice<Bean>(....) { private static final long serialVersionUID = 1L; @Override protected void onSelectionChanged(Bean newSelection) { super.onSelectionChanged(newSelection); // my logic } } super.onSelectionChanged(newSelection); is pre-written in the onSlectionChnaged method. I can remove that code or I can keep that and add my code below that, it all works...

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...

AngularJS dropdownlist with treeview

angularjs,drop-down-menu,treeview,custom-controls
I am new to angularjs, i want to use dropdownlist with treeview structure. i used both dropdownlist and treeview control separately but find difficulty in using together. can anyone have idea about how to use both together(dropdownlist+treeview)

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...

(Help) Get results from multiple dropdown with one submit button

php,html,post,drop-down-menu,submit
I make four horizontal dropdown menu. Here is my code : <div class="MenuSearching" id="Searching"> <div class="Menu1" id="Menu1"> <p> Lembaga</p> <form style="margin-top:-20px;margin-left:-2px;"> <select name="DropLembaga" autofocus required id="DropLembaga"> <option value="no" selected="selected">---Choose one---</option> <option value="FlashCom">FlashCom</option> <option value="InterNusa">InterNusa</option> <option...

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...

How to validate age and alert if the current date is the user's birthday?

javascript,validation,drop-down-menu
Okay, I'm very new to Javascript (I started about 2 months ago in my computer's class) and I'm doing an assignment that requires a form that includes date of birth (with day/month/year each in a dropdown) and I need to be able to: a) Confirm that the user is over...

Removing an option from all other chosen multiple dropdowns, when selected on a particular dropdown

javascript,jquery,drop-down-menu,jquery-chosen
I really messed up in a script. But I would want some additional help. I have attached a jsfiddle link over here. http://jsfiddle.net/p0b4j5o8/18/ If you check the fiddle link, you will see that I have written javascript/jquery code( a function named add_mitigator() ) in the html section. When I used...

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...

Menu CSS issue in IE8

css,drop-down-menu,internet-explorer-8
I have created a Menu list. It is working perfectly on Chrome and Firefox but misaligned in IE8 Chrome Snapshot :- http://postimg.org/image/g6uf9zikr/ IE8 Snapshot :- http://postimg.org/image/u6o3pzasz/ Here's my CSS ------ div.menu { background-color:#383838; height:65px; margin-bottom:20px; } div.menu ul { vertical-align:middle; list-style:none; margin:0; padding:0; } div.menu ul li { float:left; display:block;...

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...

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...

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...

Can't add TemplateField to Datagrid

html,asp.net,visual-studio,drop-down-menu,datagrid
I am trying to add a DropDownList into the DataGrid so the location column can be easily changed. I am getting an error with TemplateField, itemtemplate, label and DropDownList. I get the build error: is not allowed within a 'System.Web.UI.WebControls.DataGridColumnCollection'. <asp:DataGrid runat="server" CssClass="tblResults" OnItemDataBound="dgList_ItemCreated" AllowSorting="true" OnSortCommand="dgTrailer_Sort" ID="dgTrailers" DataKeyField="ID" AutoGenerateColumns="false"> <Columns>...

Show drop down menu onmousedown without loosing onclick functionality

javascript,drop-down-menu,onclick,focus,onmousedown
I try to get a drop down menu to work as most drop down menus seem to work, i.e. as soon as the mouse button is pressed on the trigger the drop menu shows up. Seems rather easy with some css and javascript but it turns out to be a...

Open sub-menu without creating empty space [closed]

html,css,twitter-bootstrap,drop-down-menu,submenu
I've tried to solve my problem, but the answers did not solve my specific problem. When the sub-menu expands, empty space shows up, although the sub-menu is placed on the left of the dropdown-menu. I've embedded the code of my navbar here: 'jsfiddle.net/nickiname/Lds2bkuv/' <!-- Fixed navbar --> <div class="navbar navbar-default...

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 to keep java.awt.List from covering javax.swing.JMenu

java,netbeans,drop-down-menu,awt,jmenu
To put this simply, I have some Menus in my Menu Bar that, when at start of the application, goes over a List when you expand it. However, if the List is ever updated, the Menus will go behind the List, covering Menu Items. I have theorized that I need...

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...

VBA: Detecting value in cell with dropdown list

excel-vba,drop-down-menu
I am having some trouble detecting the value in a cell with a dropdown list. When I am running the below code, it only gives me the value 0 in column I. Column H contains a number of Dropdown lists (made by data validation), which value can either be Yes...

how to populate dropdown list in Django from a foreignkey model

python,django,drop-down-menu,foreign-keys
I have two models. class ArticleCategory(models.Model): category = models.CharField(max_length=255,blank=False) class Article(models.Model): title = models.CharField(max_length=255,blank=False) body = models.TextField() pub_date = models.DateTimeField(auto_now_add=True) category = models.ForeignKey(ArticleCategory,default=1) Now I have to render a template and save the form for Article model. I have a foreignKey field in my Article Model and because of that...

Add “Please Select” to Drop-down list that retrieves values from Data base

c#,asp.net,sql-server-2008,drop-down-menu
I have a drop-down list and uses the SQL data source for it where I am retrieving the product names from SQL server. Now, I want to add "Please Select a product" Option to the drop-down list. As far as my knowledge, I add options to drop-down list by using...

Iterate through an Excel dropdown/validation list

vba,drop-down-menu,data-validation
I have a cell with a validation list that changes depending on other settings. Is it possible to iterate through that cell in code? Is it also possible to set that cell to the nth item in the list? Example: The drop down for E2 depends on what was selected...

How to filter values in Multiple selection using textbox value

javascript,jquery,html5,drop-down-menu,autocomplete
I have a text box and multiple selection box. When ever I write something in text box it will filter that text in the multiple selection and show only matched value. <!DOCTYPE html> <html> <body> <select id="uniqueCarNames" name="cars" multiple> <option value="volvo">Long Distance Travel</option> <option value="saab">Amazing </option> <option value="opel">Excellent Travelling</option> <option...

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....

AngularJS Dropdown Directive Set Selected Item Through Two Way Binding

angularjs,drop-down-menu,angularjs-directive
I have an angularjs dropdown directive. I want to be able to pass the id of the item I want to be selected as an attribute of the directive. Something like this: <dropdown selected-item-id="ctrl.selectedItemId"></dropdown> I implemented this and it's not working. If I display the value of itemId on the...

How to add menu items separators programmatically on Windows?

windows,delphi,drop-down-menu,menuitem
I have a mainmenu on my Form and I want to be able to insert separator to it programmatically not during design time. I went through context popup menu for the mainmenu that lists all the available properties and did not find anything that will allow me to insert separator....

why doesn't this drop-down menu work with mouseover and leave?

javascript,css,drop-down-menu,mouseover,mouseleave
I want it to display "you" under "Home" when hovering and disappearing when mouse leaving: // HTML <ul> <li><a id="homeBox" href="#">Home</a> <ul><li><a id="homeSub" href="#">you</a></li></ul> </li> </ul> // javaScript var homeB= document.getElementById("homeBox"); var homeS = document.getElementById("homeSub") homeBox.mouseover = function() { var homeS = document.getElementById("homeSub").style.display= "block"; } homeBox.mouseleave = function() { var...

Include a DropDown in RadToolBarDropDown

html,asp.net,drop-down-menu,telerik
So I'm using Telerik's gui system and would like to insert a dropdown inside another one but I don't know how to do that. This is what I've got so far <telerik:RadToolBarDropDown runat="server" ToolTip="DropDown1" ImageUrl="~/Images/test.png"> <Buttons> <telerik:RadToolBarButton runat="server" Text="Click me!" Value="TOGGLE_WALLS" CheckOnClick="true" ImageUrl="~/Images/checkmark.png"/> </Buttons> </telerik:RadToolBarDropDown> More or less, a dropdown...

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 to make a Bootstrap radio button continue into a dropdown menu

html,drop-down-menu,radio-button,bootstrap
I would like to have a radio button with a couple options showing, and the rest available in a dropdown menu. I can get the interactions I want by assigning every option to a class, but I would like the color of the dropdown menu to change to the active...

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...

CSS drop down navigation

css,html5,css3,drop-down-menu,navigation
I'm sure this is something simple I'm missing... My drop down menu is opening within the main navigation, widening it. Here is a link to the page I'm working on. The issue is with the navigation below the App buttons. http://membershq.incentiveusa.com/AwardPages/GoalUp_Test2/index_test3.html# Here is my HTML: <div class="container-fluid"> <div class="section-title2 text-center">...

CSS Dropdown Menu dropping horizontally

css,drop-down-menu,menu
I'm working on a website that was built several years ago by my employer, and I'm trying to implement a dropdown menu using CSS only. However, instead of dropping down when you hover over it, it drops horizontally, like so: It also loses all the formatting of the parent list,...

Chained Dropdown in flask, get data from sqlite database

javascript,python,sqlite,drop-down-menu,flask
I am trying to get a html select tag with different counties (getting from database), when the user have selected a county, I want another select tag to enable and show the cities in that county (I have the data in a sqlite database, where the county id is in...

Create a new select dropdown object with jQuery

jquery,html,select,drop-down-menu
I am trying to create a select (<select><option...</select>) object in jQuery. I tried this, but it won't add the option values and text: var photos = [ '_DSC0153.jpg', '_DSC0154.jpg' ]; var dropdown = $("<select>", { id: 'selectfile' , option: { value: '0', text: photos[0] } , option: { value: '1',...

Hide options in dropdown select

jquery,drop-down-menu
I do not have access to adjust the options within a dropdown. So I want to hide them from the DOM. I am having trouble just hiding the option. Currently I can hide the entire dropdown, if my array consists of the countries I want to hide. https://jsfiddle.net/gmLa5bgz/ html <select...

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...

Bootstrap wrap menu elements at 960px

twitter-bootstrap,drop-down-menu
I have small issue. When width page is 768-991px, my menu wrap into second line. I want to browser show button for collapse menu. How can i do it? There is a link for project: http://interpages.pl/ftp/projects/fremel/...

Adding