FAQ Database Discussion Community


Bootstrap3 + Angular with Select causes the drop down to cut off

angularjs,html5,twitter-bootstrap-3,html-select,ng-options
I am trying to use the HTML Select tag along with AngularJs using the ng-options directive to create a drop down options menu. On top of this I am using Bootstrap 3. I also have ui-bootstrap imported into the project. Everything works functionally but I have an odd issue where...

How can I select a value from a DropDownList element using jQuery?

jquery,sharepoint-2010,html-select
In my Sharepoint page, I'm dynamically creating dropdownlists like so: ddlDepartureDateMonth = new DropDownList(); ddlDepartureDateMonth.ID = "departurDateMonth"; ddlDepartureDateMonth.CssClass = "finaff-webform-field-input"; ddlDepartureDateMonth.Items.Add(new System.Web.UI.WebControls.ListItem("Jan", "1")); ddlDepartureDateMonth.Items.Add(new System.Web.UI.WebControls.ListItem("Feb", "2")); ddlDepartureDateMonth.Items.Add(new System.Web.UI.WebControls.ListItem("Mar", "3")); ddlDepartureDateMonth.Items.Add(new...

Showing and hiding sections with CSS based on a drop-down option

html,css,hide,html-select
Iam using a rather neat example where a user hid sections based on the input from radio buttons, listed below: CSS: div[class^="section"] { display: none; } input.choose-a:checked ~ div.section-a, input.choose-b:checked ~ div.section-b, input.choose-c:checked ~ div.section-c { display: block; } HTML: <input type="radio" class="choose-a" name="sectionselect"/> <input type="radio" class="choose-b" name="sectionselect"/> <input type="radio"...

Javascript jQuery - selecting select box option only works sometimes

javascript,php,jquery,html-select
the project is an MVC project writen in PHP I have an AJAX call in a veiw that echoes, into a div, a bit of Javascript that does some things on the page. At the end of the script is a piece of JQuery that should change a select boxes...

Update price based on select options

jquery,html-select
I have multiple select options in a form with prices attached to each with data-price. When any option changes or is selected i need to update the price based on all the selections. I have tried the following: http://jsfiddle.net/325x2d8e/ html: <h3>Size</h3> <select class="form-control calculate" id="size" name="size"> <option data-price="5.00" value="Small">Small</option> <option...

space is shown when selecting the dropsdown option - angularjs

javascript,angularjs,html-select,space,dropdownbox
I have created an application in AngularJS with a drop down with space in option using a filter. The application is working fine with the options in drop down with indentation space before the values but the problem is when a select an option which is having a space, the...

select option with javascript is not displaying select value

javascript,html-select
here i have a simple 3 select options , like select 1 ,select 2 and select 3 . on changing select 1 option will reset the values in select 2 and select 3 , and on changing the select 2 values calling another javascript function to reset the values in...

How to get a deleted element in a contenteditable div?

javascript,html,html5,javascript-events,html-select
I set the root div to contenteditable, and it contains many img and video elements. So when a user edits it and presses backspace to delete one element, How can I get which one the user deleted and get the deleted element's attributes values?

Can't change select option item angular

javascript,json,angularjs,html-select,angular-ngmodel
I have a select option like this: <select ng-init="filterSelected = getItems.data.key" ng-model="filterSelected" ng-options="data.key as data.label for data in getItems.data" ></select> In which i parse a json that returns me some results that shows as item in this select. This is not a problem, i can display the items but i...

Dropdown first option value not functional

php,jquery,location,html-select
I have a problem whit my dropdown list, I need to change location page when option selected using value option attribute, but the first option element not functional, This is the html code: <form> <select class='language-select' name='URL' id='URL'> <option value="index.php?lan=EN" selected> English</option> <option value="index.php?lan=FR">Français</option> </select> </form> and this is the...

Angular blank option selected

javascript,angularjs,select,angularjs-ng-repeat,html-select
I'm banging my head against the wall on this one. I have an array of objects that will be used to populate a select drop down: CardCount = [{"ClientId": "0010", "Description": "0010 (206 Members)"}, {"ClientId": "0051", "Description": "0051 (1 Member)"}, ........] When I attempt to use ng-options, the value of...

Kendo dropdown with ng-options instead of DataSource

javascript,angularjs,kendo-ui,html-select,angular-directive
I've got a dropdown list defined using angular like this: <select class="form-control" ng-model="controller.selectedUser.superiorId" ng-options="superior.userId as superior.lastName + ' ' + superior.firstName for superior in controller.superiors | orderBy:['lastName', 'firstName']"></select> This works fine, however I want to show a little image next to the entries and so I'm trying to convert this...

How to generate select option in laravel?

php,laravel,html-select
I am converting my project to pure laravel. Here is my option select tag in html How I can convert it in pure laravel which should also have class name in it <select class="field" name="number"> <option value="0">1</option> <option value="1">2</option> <option value="2">3</option> </select> ...

How create Dropdown list only using ViewBag in ASP.NET MVC 4?

asp.net-mvc-4,html-select,html.dropdownlistfor,viewbag
Here I have a model class.. public class MyDrop { public int id { get; set; } public string value { get; set; } } In my controller I use this code.... public ActionResult Index(){ var GenreLst = new List<MyDrop>(); MyDrop a = new MyDrop(); a.id = 1; a.value =...

Opening a new php page using JQuery

javascript,php,jquery,mysql,html-select
I would like to open a new page whenever a user clicks one of my html select options using JQuery. Following the example on the JQuery tutorial, I structured my code as shown below. However, the page doesn't open when I click any of the options $('#Databases').change(function () { $.post("test.php");...

  in script is not getting compiled

javascript,angularjs,html-select,angular-filters
I have created an application in AngularJS with a drop down with space in option using a filter. The application is working fine but the &nbsp; which I have put for space is not getting compiled. My code is as given below JSFiddle html <select> <option ng-repeat="(key, value) in headers">{{value...

Adjust width of select element according to selected option's width

javascript,jquery,twitter-bootstrap,twitter-bootstrap-3,html-select
I want the select element to have the default option value's width which is shorter. When the user selects another option, the select element should resize itself so the whole text is always visible in the element. I have found a solution in the question Auto resizing the SELECT element...

Select default value of element?

javascript,internet-explorer,reactjs,html-select,internet-explorer-10
Say I have the following React element (example fiddle here): var Hello = React.createClass({ getInitialState: function() { return {parsed: false}; }, _parseEvent: function(event) { var parser1 = event.currentTarget.selectedOptions[0].value; var parser2 = event.target.value; var parser3 = event.nativeEvent.srcElement.value; if (parser1 && parser2 && parser3) this.setState({parsed: true}); }, render: function() { var parsing...

select values in a form not getting submitted

ruby-on-rails,forms,html-select,form-submit
I'm not exactly sure what I'm missing, when I use the dev tools the form shows up properly in the html but the only value that is not being submitted it the one in the drop down. I looked at my database and it's not submitting any value at all...

Run function when option is selected angularJS

angularjs,html-select
Currently have my checkboxes adding and subtracting their costs from my total cost. How can I get my select to do the same? Currently its putting in a default value of 7700.00 when without the select field it is at 0.00. Also noticed my select field is breaking my checkbox...

Formatting dates in an MVC Dropdown

date,model-view-controller,html-select
I have a dropdown list on my page as so: - @Html.DropDownList("dd_dates", new SelectList(@Model.seasonDates), "Please Select") where seasonDates is an IList of dates. The problem is that when the dates are displayed in the dropdown they also have the time on them as well. How do I format the display...

WTForms usage for dynamic options?

javascript,google-app-engine,html-select,wtforms
I use WTForms with Jinja2 in appengine and I have a dynamic option field where the available choices for a city depends on the choice of a region. Now I want to enable validation also for regions and cities (mainly if a user didn't select a region/city) but I don't...

Javascript if an option is selected than a new sets of option appear

javascript,jquery,html,forms,html-select
In a nutshell, I would like that when the user selects an option, a set of options appear in relationship that option selected. Below is what I have done thus far: The HTML: <form method="" action=""> <input type="file" placeholder="Upload Project"> <select id="selectProvider"> <option disabled selected> Select Training Platform </option> <option...

Having trouble getting