w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
programmatically making a dropdown menu in vb.net WPF
Preferred approach normally is to use a Popup. You got two very important properties with a Popup PlacementTarget and Placement Setup a binding for PlacementTarget on the Popup to your custom Button and then use Placement to position the Popup accordingly w.r.t to the PlacementTarget(Button) Placement accepts an enum of type PlacementMode which gives you quite a few options to position the Popup.

Categories : Wpf

Modify spinner's dropdown box programmatically
First of all set a adapter for your spinner like this: ArrayAdapter<String> ageAdapter; = new ArrayAdapter<String>(this, R.layout.spinner_item, age); yourSpinner.setAdapter(yourAdapter); Now create a xml file in your layout folder named spinner_item like this: <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/spinnerText" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingLeft="5dp" android:textSize="17sp" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@drawable/tool1" /> This will might help you..

Categories : Java

How can I open the Bootstrap Dropdown programmatically?
You can try subclassing DropDownButton, adding a getter for the trigger button (at the end of the class), like this: public class CustomDropdownButton extends DropdownBase { private Button trigger; /** * Creates a DropdownButton without a caption. */ public CustomDropdownButton() { super("div"); addStyleName("btn-group"); } /** * Creates a DropdownButton with the given caption. * * @param caption * the button's caption */ public CustomDropdownButton(String caption) { this(); setText(caption); } /** * {@inheritDoc} */ @Override protected IconAnchor createTrigger() { trigger = new Button(); trigger.setCaret(true); return trigger; } /** * Sets the button's size. * * @param size * the button's size */ public void setSize

Categories : Gwt

Add UISearchBar programmatically to a programmatically added UITableView in a normal ViewController
Is your object implementing the delegate methods in UISearchDisplayDelegate? In other words, you have to define what happens when text is entered in the search bar, it does not happen automatically for you.

Categories : Objective C

A dropdown menu who have dropdown's inside (Bootstrap-navbar) for tablet
I found another solution. I added that after my code : <script type="text/javascript"> $('.dropdown-menu').click(function(event){ event.stopPropagation(); }); </script> Dropdown can't works with this solution, so i used "dropdown-submenu" to fix that (Thanks @Schmalzy for that). So when i touch a link, the submenu open. the submenu can't works normally on a tablet without the code above.

Categories : Twitter

MVC4 Cascading dropdown list just working for 2 dropdown lists and not for more than that
I just moved the two onchange functions (other than firstone) to other views, which load my dropdowns. Actually it was a post back issue, so on single view Change for more than one "ddl" was not fired. Moving it to Partial Views did the trick

Categories : Jquery

Postback of one dropdown fires selectedindexchanged event of all all remaining dropdown
You didn't bind the SelectedIndexChanged event on the "ddlSample" dropdown. Please try binding that property like so.. <asp:DropDownList ID="ddlSample" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlSample_SelectedIndexChanged"> <asp:ListItem Text="text1" /> <asp:ListItem Text="text2" /> </asp:DropDownList>

Categories : Asp Net

How to display dropdown list depends on the another dropdown option in joomla 3.x
I have provided the jQuery Solution $('select#two').prop('disabled', 'disabled'); $('select#one').change(function() { $('select#two').prop('disabled', false); }); JSFIDDLE DEMO

Categories : PHP

passing selectedindex of one dropdown as an mvc parameter of a second dropdown on same razor view
You need a cascading dropdown plugin, either roll your own and perform a get when the first dropdownlist changes, or use a plugin like this http://www.ryanmwright.com/2010/10/13/cascading-drop-down-in-jquery/

Categories : Jquery

codeigniter dropdown order, value chosen on first dropdown musn't apear on 2nd one
I suggest to include all sports in all dropdowns and when you want to submit your form, go and check to see whether there are any same valued dropdowns or not. You can get them with: var flag = false; var e1 = document.getElementById("dropdown1 id"); var value1 = e1.options[e1.selectedIndex].value; var e2 = document.getElementById("dropdown2 id"); var value2 = e2.options[e2.selectedIndex].value; ... if(value1 != value2 && ...) { flag = true; } if(flag) { // Stuff }

Categories : PHP

Dropdown w/ overflow:visible moves divs around dropdown in Safari?
On your gf-style.css on line 297 you have "overflow: visible". That's what is causing consistency issues. Remove that and should be fine on all browsers. EDIT: That was not it, this is the solution. Add this in your CSS file: .clearfix { display: inline-block; } .clearfix:after { content: " "; display: block; height: 0; clear: both; overflow: hidden; visibility: hidden; } .clearfix { display: block; } And then add this class to your two_col_container div: <div class="two_col_container clearfix">

Categories : CSS

Codeigniter Form dropdown filter function using ajax, loads page very slow in dropdown onchange event
Considering the number of HTML contents being passed using Ajax it will really slows the loading of the content of the div. Better way to speed it up is to lessen the number of codes to be passed using ajax.

Categories : Javascript

Php select default dropdown based on dynamic dropdown
Try this (replace lines 25-29): <?php while ($dd_loc_row = mysql_fetch_array($dd_loc_result)) { echo "<option value="" . $dd_loc_row['office_id'] . """.($row['pat_loc'] == $dd_loc_row['office_id'] ? ' selected="selected"' : '').">" . $dd_loc_row["office_name"] . "</option>"; } ?>

Categories : PHP

How to assign the option value from a dropdown to select id of another dropdown?
$(document).ready(function(){ $("#section_id").change(function(){ var v = $(this).val(); var y = $('#'+v); y.show(); y.siblings('[sub_*]').hide() }); });

Categories : Javascript

Why does this JQuery dropdown plugin only work on the first dropdown?
It's happening because the plugin uses the deprecated (and now removed) .live() event binder. In jquery.selectbox-0.2.js change line 303 from: $("html").live('mousedown', function(e) { to: $("html").on('mousedown', function(e) { Here it is working (without styles) with jQuery 1.10.1: http://jsfiddle.net/3q9Wg/

Categories : Javascript

Bootstrap dropdown: positioning of dropdown content
Not sure about how other people solve this problem or whether Bootstrap has any configuration for this. I found this thread that provides a solution: https://github.com/twbs/bootstrap/issues/1411 One of the post suggests the use of <ul class="dropdown-menu" style="right: 0; left: auto;"> I tested and it works. Hope to know whether Bootstrap provides config for doing this, not via the above css. Cheers.

Categories : CSS

if i select dropdown option 1 then i get another dropdown only one record
This can be achieved using jQuery irrespective if you are using ASP.NET MVC. It is one way of achieving what you need and there might be other solutions that you can follow, but this worked for me. Below are samples from my code, you can modify it to fit in with your scenario. In my sample I am going to be working with departments and units when adding a new user. A department consists out of different units. So when a department is selected from the first drop down then all that department's units will be displayed in the second drop down. Let me start with the view (page). It accepts a view model called CreateUserViewModel. A view model should always be used instead of passing through your domain model. @model MyProject.ViewModels.Users.CreateUserViewModel The HTML markup representi

Categories : Asp Net Mvc

Populate Dropdown 2 based on Dropdown 1 selection
You shouldn't need 2 controllers for this, in fact that is probably one of the problems. Once they are within the same scope you can easily tie them together. Use ng-change on the first option to trigger a function that gets the values to populate the second option. Example Fiddle: http://jsfiddle.net/TheSharpieOne/Xku9z/ Also, you can use ng-show with the second select's options array length to only show the second select when it has been populated. Example Fiddle: http://jsfiddle.net/TheSharpieOne/Xku9z/1/

Categories : Angularjs

Dropdown Navigation bar with different dropdown images
You can use padding in CSS to create each <li> tag with distance between each other. So each image will have 10px or any other distance between the other li tag. Here is an example: li{ padding-right: 20px; } The padding-right: 20px; mean there gonna be 20px distance from each li part as I said earlier.

Categories : HTML

dropdown is not posting corresponding values in another dropdown
Use following code : <script type="text/javascript" src="<?php echo base_url();?>js/jquery.dataTables.js" ></script> <script type="text/javascript" src="<?php echo base_url();?>js/jquery.dataTables.min.js" ></script> <section id="tables"> <script> jQuery(document).ready(function() { oTable = jQuery('#studenttable').dataTable({ "bJQueryUI": true, "sPaginationType": "full_numbers" }); }); </script> <script type="text/javascript" charset="utf-8"> jQuery(document).ready(function(){ jQuery.ajax({ data: { exam_name: exam_name, }, type: 'POST', url: 'student_site/studentcreate', success: function(data){ console.log(data); jQuery('#crud')

Categories : PHP

How to select multiple items from dropdown list, save it and again repopulate the dropdown with the selected list?
The default DropDown helper that is provide in asp.net mvc does not support multiselet. You'll have to create your own custom multiselect dropdown helper. Here are some links that can help you create you own custom dropdown helper: http://blogs.msdn.com/b/rickandy/archive/2012/01/30/asp-net-mvc-dropdownlist-multiselect-and-jquery.aspx http://utsavized.com/chosen-multiselect-dropdown-list-with-asp-net-mvc3/

Categories : Asp Net Mvc

Render a dropdown inside extjs grid and change other columns text on dropdown change
You're looking for component cells. have a look on this http://www.sencha.com/forum/showthread.php?148064-Component-Column-Components-in-Grid-Cells

Categories : Extjs

How to default a custom-styled dropdown to browser default style dropdown
It looks to me that you're using a 3rd party javascript library that is automatically converting all select boxes into the custom styled look that you're getting on page load. My suggestion would be to remove each javascript library one by one to find the culprit (by looking at the style on the rendered <select>, i'd say it's JCF). It's really got nothing to do with your html or css styles. You can tell this because the select box has a jcf-hidden style on it (so it's hidden), and your 'inspect element' is showing you a <span> instead of the actual <select>

Categories : HTML

using jquery how do I filter a dropdown field based on value selected from another dropdown field
Using AJAX is a great way to do what you are asking. Please forgive me if you already know this but in jQuery/javascript, you: grab the value of the first select box use AJAX code to send that to a secondary PHP file, which uses the data it receives to write some HTML code based on what the user chose the newly constructed HTML is ECHOed back to the ajax routine, where it is received inside a success function Inside the success function, you can use jQuery to replace the contents of the second dropdown Here is a detailed example, with explanations

Categories : Jquery

Laravel/Javascript: populate a select/dropdown after a different select/dropdown is selected
That tutorial was written for Laravel 3 so somethings will be different. You can tell this because some of the methods are in snake_case rather than camelCase. return Response::json($models->select(array('id','name'))->get()) That should return a valid json response usable by Javascript. However, you may need to do some edits on your models as well if you followed that tutorial. belongs_to should be belongsTo and has_many should be hasMany.

Categories : PHP

Show/Hide dropdown list values from other dropdown list value changed
There are a lot of options, but you shouldn't start with the items hard-coded in your markup. Quick solution: Have a private List<string> variables set up for each of the collections of numbers (I say string instead of int because ListItems will be converted to strings). So for instance, private List<string> personalLoanIds = new List<string> () {"12", "24"}; When ddlLoanType is changed to Personal Loan, you can set your ddlDuration's DataSource to personalLoanIds then call the DataBind() method.

Categories : C#

Populate dropdown list by another dropdown list in django with formsets
I had a similar problem related to populating drop down menus in a formset based on a user selection (which could be multiple rows in a table). What worked for me was to modify the base_fields in the formset before I put the selected rows in the formset like so: formset = modelformset_factory(mymodel) formset.form.base_fields['my_parameter'] = forms.ChoiceField(choices=getMyParamChoices()) finalformset = formset(queryset=model.objects.filter(id__in=request.POST.getlist('selection') 'selection' is the list of selected rows from the previous page. getMyParamChoices() is a function that queries a model to get the list of pulldown choices like so: def getMyParamChoices(): '''Go get the list of names for the drop down list.''' all = anothermodel.objects.all() params = [] for item in all:

Categories : Django

Need to load bootstrap-dropdown.js after bootstrap.js to make dropdown work - why?
From Bootstrap website : Plugins can be included individually (though some have required dependencies), or all at once. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. you do not need the bootstrap-dropdown.js if you include bootstrap.min.js or bootstrap.js from the bootstrap page, check this overview on Bootstrap site. i can see that you are including both bootstrap.min.js and bootstrap.js but only one is enough. Check the demo here, only using bootstrap.js. Also, you can download a customized version from here, just according to your need you can add components/plugins and then download the custom build.

Categories : Javascript

PHP : Get the value of Dropdown and pass it to another dropdown
Have you tried? changing (on the second page) <option value="">- select -</option> to <option value="<?php echo $yourVar; ?>"><?php echo $yourVar; ?></option> Then in the while loop, skip the value selected to prevent a duplicate choice. Something like: while ($row1 = mysql_fetch_array($q)) { if($yourVar != $row1[fldNetname]){ echo "<option value='".$row1[fldNetname]."'>".$row1[fldNetname]."</option>"; } }

Categories : PHP

Dropdown dependent on other dropdown in php
if you are looking to create dropdown boxes, I believe you should not be creating a table, instead you need the select tag. I know this doesn't fully answer your question but I believe this should get you started. If your php code is producing the results you want, populate them into select tags and take it from there.

Categories : PHP

How can i populate a dropdown list by selecting the value from another dropdown list
$(function() { $('#first_select').change(function() { value = $(this).val(); $("#second_select").append('<option value=" + value + ">' + value + '</option>'); }) })

Categories : PHP

when selecting a value from a dropdown list set other dropdown list to it's default value
Here is a idea to start. Consider 2 dropdown like this. <select id="Numeric"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> <select id="Alphabets"> <option value="A">A</option> <option value="B">B</option> <option value="C">C</option> </select> Based on the value of 1st dropdown i am selecting the second dropdown var val = document.getElementById("Numeric").value; var obj = document.getElementById("Alphabets"); if(val == "1") obj.value = "A" else if(val == "2") obj.value = "B" else if(val == "3") obj.value = "C" Switch is more better switch(val) { case("1"): obj.value = "A"; break; case("2"): obj

Categories : PHP

PHP dropdown to query for another dropdown to query for results
So I haven't managed to work out the dropdown/select side of things, but I have managed to answer the question of how to pass a result from one query and then query against that - also I have managed to print the results in an HTML table. So, in order for the querying of the categories which will eventually be the basis of the whole page and its' dropdowns: $query = "select id, name, replace(replace(arrange, 'c,', ''), '|', ',') As Arrange from cats where arrange like ('c,%') limit 10"; $result = mysql_query($query); if (!$result) { $message = 'Invalid query: ' . mysql_error() . " "; $message .= 'Whole query: ' . $query; die($message); } The above is doing the first query in preparation for the storing of the result as a string. while ($row = mysql_fetch_array($result)) { $arrange

Categories : PHP

Programmatically set R.ID
R is a Read-Only class. It is generate at compile time and You should not use reflection to modify its field. Also you should avoid reflection to access the fields values. You should use the official API. The comment at the first row of the class is /* AUTO-GENERATED FILE. DO NOT MODIFY. */

Categories : Android

Best way to name objects programmatically using R?
There is a fair amount of guesswork involved in this answer but I think this could help: # get a vector with the column names in data_resp modNames <- colnames( data_resp ) # create empty list models <- as.list( NULL ) # iterate through your columns and assign the result as list members for( n in modNames ) { models[[n]] <- train(data_pred_scale[!is.na(data_resp[, n]), ], ### this may need modification, can't test without data data_resp[!is.na(data_resp[, n]), n], method = "rf", tuneGrid = data.frame(.mtry = c(3:6)), nodesize = 3, ntrees = 500) } # save the whole bunch save( models, file = "models.rda" ) You can now retrieve, just with load( "models.rda ), this one object, the list with a

Categories : R

Sign JAR programmatically
I Signed jar using pom.xml I happy if it help you: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>ABC</groupId> <artifactId>applet</artifactId> <version>ABC</version> <packaging>jar</packaging> <name>applet</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <build> <plugins> <plugin> &l

Categories : Java

How can I use JDT compiler programmatically?
org.eclipse.jdt.internal.compiler.Compiler is internal API. According to the JavaDoc of its resolve method: Internal API used to resolve a given compilation unit. Can run a subset of the compilation process. Instead, the official way of compiling Java files and determining the compilation problems is described here. Basically, you create a Java project and invoke Eclipse's builder on it, then query the project's Java problem markers.

Categories : Eclipse

How to kill an 3rd-app programmatically?
You can't kill just any process in Android. From the documentation on Process: Note that, though this API allows us to request to kill any process based on its PID, the kernel will still impose standard restrictions on which PIDs you are actually able to kill. Typically this means only the process running the caller's packages/application and any additional processes created by that app; packages sharing a common UID will also be able to kill each other's processes. Also note that the permission you're requesting in your manifest doesn't work the way you think it does. According to the documentation, KILL_BACKGROUND_PROCESS: Allows an application to call killBackgroundProcesses(String).

Categories : Java

DetailViewController programmatically iOS
Your labels are not being updated to the correct values because the -isEqualToString: method is used to test whether two NSStrings are equal, and it doesn't actually set the value of any NSString. If you want to assign a value to a string variable, you do it the same as you would assign any other variable. Therefore, in order to set the labels properly, you just need to assign the text property of the UILabels, like this: self.username.text = self.user; self.captiontext.text = self.caption;

Categories : Iphone

How to add DRM on epub programmatically?
If you just want to protect your books from copying, then publish them through Amazon or Apple. As long as you don't select otherwise, those bookstores will wrap the books in DRM that allows them to be read only a limited number of devices belonging to the purchaser. If you have some reason for wanting to worry about DRM yourself, then after carefully considering why on earth you'd want to, you'll need to find a vendor who can provide both the DRM technology and the reader (perhaps white-labeled for you) which knows how to read those DRM'd books. You see, DRM is useless unless there's a reader that can read the DRM'd books. And what's more, you need a back-end infrastructure to keep track of which devices belong to which person. There are vendors who provide such solutions. However, you'l

Categories : Misc



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.