w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
selected radio button values to display in textbox and dropdown menu using Jquery
try this "<input type="radio" name="joblist" onclick="myfunc(this);" id= ' + value.jobid + 'value=' + value.jobid + '/>" function myfunc(ele){ var $tr=$(ele).parent().parent(); .... //the rest of the code } to select the one you want. $("#OS option").each(function(){ if($(this).val()==os) $(this).attr('selected','selected'); else $(this).removeAttr('selected'); });

Categories : Jquery

Updating textarea with selected item from dropdown in a template using knockoutjs
This should do the trick: http://jsfiddle.net/trr5e/3/ Make sure you have a ko.observable which can hold the selected item and connect that to the select element: <select data-bind="options: $root.products, optionsText: 'Name', value: selectedProduct, optionsCaption: 'Select a Product'"></select> Than you can use the properties of the selected item in other controls: <input type="text" data-bind="value: selectedProduct() ? selectedProduct().Name : ''"/>

Categories : Javascript

Show different SELECT menu when different radio button selected
As you can't uncheck a radio and only one radio in the group can be checked, any change would normally be to check it, and if the ID of the checked radio matches Tester, show DripFeed1 and hide DripFeesd, otherwise do the opposite : $('[name="PackageID"]').on('change', function() { var state = this.id == 'Tester'; $('[name="DripFeed1"]').toggle(state); $('[name="DripFeed"]').toggle(!state); }); Note that ID's are unique, and you're using select3-basic multiple times (and the same tabindex). FIDDLE

Categories : Jquery

Google spreadsheet - incrementing counter for item every time it is selected from dropdown menu
If I understood your question correctly, with this piece of code it is possible: Code function onEdit(e) { if(e.range.getA1Notation() == "A2") { var sCounter = e.source.getRange("B2"); var counter = sCounter.getValue(); if(counter === 0) { counter = 1; } else { counter ++; } sCounter.setValue(counter); } } Example I've created an example file for you: Dropdown Counter Remark This script will only execute if the cell is active in A2.

Categories : Javascript

How to get the selected value of Radio button into session variable in php
<?php $_SESSION['val1'] = "document.write(radioVal)"?> Will not work as php sessions are stored at server so you need to send the data via ajax or otherwise you should store it in Javascript session.

Categories : PHP

adding a button or menu item to selected contact
You can use Intents for this purpose. When you click a contact implement OnItemSelected metthod in the activity( here contacts) in that method please create a intent and invoke that intent by either startActivity or startActivityForResult. Sample code can be available in Professional Android 4 Application Development book. In that book look into application "ContactPicker" Url for the book is "http://rads.stackoverflow.com/amzn/click/1118102274"

Categories : Android

Change button image when context menu item is selected
First, I think you need to change your MenuItem.ItemContainerStyle to just MenuItem.Style - I believe the ItemContainerStyle is meant for the sub-menuitems that you can place into the MenuItem when you want nested context menus. I was able to get the content of the button to change with the following code. I used text content, but it should be easy to swap it out for image content: The xaml: <Window x:Class="ChangeButtonContent.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <Button Height="30" Width="200"> <Button.Content> <DockPanel > <TextBlock Text="{Binding ChangingText,

Categories : Wpf

How to add a radio button group in a core java program such that only one radio button is selected at one time?
JPanel radioButtonPanel = new JPanel(); append = new JRadioButton("append"); build = new JRadioButton("x.x.1"); build.setSelected(true); //sets this button as selected on startup small = new JRadioButton("x.1.x"); huge = new JRadioButton("1.x.x"); // Create the button group to keep only one selected. ButtonGroup btnGroup = new ButtonGroup(); btnGroup.add(append); btnGroup.add(build); btnGroup.add(small); btnGroup.add(huge); Then you add your Buttons to your JPanel or something similar.

Categories : Java

how to select only clicked radio button and every other radio button should not be selected in dynamic addition
try this $("input:radio").attr("checked", false); <script> $(document).ready(function () { $('.radios').click(function() { $("input:radio").attr("checked", false); $(this).attr("checked",true); }); }); </script>

Categories : Jquery

jquery how to set radio button list item based on another radio button selection asp.net c#
You can access the radios specifically by using the syntax below $("input[@name=<%=rb2.ClientID%>][value=0]") $("input[@name=<%=rb2.ClientID%>][value=1]") Just use .text to set the value Or $('[id*=rb2][value=0]').text('something') $('[id*=rb2][value=1]').text('something else')

Categories : Jquery

How can I give a radio button a value and determine the selected radio button without using a GroupBox
If you want to assign an arbitrary value to the control, use its Tag property: radColor1.Tag = 5; But why can't you simply use the Checked property? if (radColor1.Checked) //do something if (radColor2.Checked) //do something else //...however many more you need to check EDIT: iteration... foreach (Control c in this.Controls) { if (c is RadioButton) { if (((RadioButton)c).Checked) //do something } }

Categories : C#

Need to click Overflow Menu Item twice when other menu item in Action bar is selected
Is this known issue? It's known. It is not an issue. The drop-down for list navigation (what I presume the "Popup Spinner" is) has the focus. It takes a tap outside of the drop-down, anywhere in the activity, to dismiss the drop-down. This is not significantly different than the behavior of a Spinner anywhere else in Android. For example, edit a contact, and tap on the Spinner to change a phone number type (e.g., mobile vs. home vs. work). It takes a tap anywhere else to dismiss the drop-down list, before a tap will have any other meaning. Is there any workaround for this? Do not use list navigation or other Spinners in your app.

Categories : Android

Radio buttons do not show database info, and also do not disable when another radio button is selected
The name attribute of the radio buttons must match that of the other radio buttons for them to pair up correctly; I don't know ruby's syntax, but I see you using 4 different names everywhere except the class, so I suspect you're setting choice_one, choice_two, etc as the name :)

Categories : HTML

If Radio Button is Selected Show Div - 8 Radio Buttons / 8 Divs - Can this be simplified?
Firstly put shared classes on both the radio buttons and the div elements which show the content. In my example I've used trigger and content respectively. Then add a data attribute to the radio to identify which div should be shown on click. Shortened example: <form id='group'> <label> <input type="radio" name="group1" class="sim-micro-btn trigger" data-rel="sim-micro-desktop" /> </label> </form> <div class="billpay-internet-add-ons"> <div class="sim-micro-desktop content">sim-micro</div> </div> Then you only need 1 click handler like this: $(document).ready(function(){ $('.trigger').click(function() { $('.content').hide(); $('.' + $(this).data('rel')).show(); }); }); You can also the

Categories : Javascript

Change controls depending on selected dropdown selected item in rails
You can put these two pairs of text_field and text_area with one portion in hidden like <div id="home_address" style="display:none"> <%= f.text_field :home_address %> <%= f.text_area :directions %> <div> <div id="office_address" style="display:none"> <%= f.text_field :office_address %> <%= f.text_area :office_directions %> </div> for script $( ".select" ).change(function() { if($(this).val() == 'office') { $('#home_address').hide(); $('#office_address').show(); } else { $('#office_address').hide(); $('#home_address').show(); } }); EDIT <%= form_for(@order) do |f| %> <select class="select_option"> <option value="home">Home</option> <option value="office">Office</option> </sel

Categories : Ruby On Rails

How to hide one item(Button) and show another item(Button) from menu (Buttons in ActionBar) in single Activity
Try this, public boolean checkHide = false @Override public boolean onOptionsItemSelected(MenuItem item){ switch(item.getItemId()){ case EDIT: if(checkHide){ checkHide=false; item.setTitle("edit"); // ToDo your function } else{ checkHide=true; item.setTitle("save"); // ToDo your function } }

Categories : Android

Collapse or hide CSS dropdown menu when a menu item is clicked
You can hide the menu when the mouse leaves by using the .mouseleave method. If you want to hide the menu when an item is clicked, you can add this to your code, in the <head> tag preferably. The following code is in jQuery: $(function(){ $("a").click(function(){ $("#menu").hide(); //or $("#menu").slideUp() if you want it to slide up instead of just disappearing. }); }); This tells the browser to close menu whenever a link is clicked. If you have other links in your web-page text, the you could include the menu links in a class, and use the class instead. For example: <ul id="menu"> <li><a href="#" class="mitem">Item 1</a></li> </ul> And then the jQuery code would be: $(function(){ $(".mitem").click(function(){

Categories : Jquery

Bootstrap 3 Hide Dropdown Menu on Menu Item Click
Change this: $(document).ready(function () { $("#navbar li a").click(function(event) { // check if window is small enough so dropdown is created $("#navbar-toggle").is(":visible") $("#nav-collapse").toggle(); }); }); to this: $(document).ready(function () { $("#navbar li a").click(function(event) { // check if window is small enough so dropdown is created $("#nav-collapse").removeClass("in").addClass("collapse"); }); }); See http://jsfiddle.net/fw7vh/4/

Categories : Jquery

css dropdown sub menu not dropping under parent menu item
You just need a couple small changes to make the nested uls appear relative to their parent li: nav li { display: inline; position: relative; } nav li ul { display: none; position: absolute; padding: 0; }

Categories : HTML

MenuMatic selected menu item dissapears when selected Update
It can be here: /* All menu links on hover or focus */ #nav a:hover, #nav a:focus, #subMenusContainer a:hover, #subMenusContainer a:focus, #nav a.mainMenuParentBtnFocused, #subMenusContainer a.subMenuParentBtnFocused{ background-color:#3366FF ; color:#FFF; /* Try #AAF here */ } /* sub menu links on hover or focus */ #subMenusContainer a:hover, #subMenusContainer a:focus, #nav a.mainMenuParentBtnFocused, #subMenusContainer a.subMenuParentBtnFocused, #nav li a:hover, #nav li a:focus{ background-color:#3366FF ; color:#FFF; /* Try #AAF here */ } This CSS makes the color of the text white. THe background here is in not white but after in the CSS you have background:#fff; applied to #nav ul. If this doesn't work you need to post your html, make a fiddle or post a live

Categories : CSS

Keeping the accordion menu open to show selected menu item
The initMenu() function, should look like this: function initMenu() { $(".sub-menu").hide(); $(".current_page_item .sub-menu").show(); $('#menu li a').click( function() { var checkElement = $(this).next(); if ((checkElement.is('ul')) && (checkElement.is(':visible'))) { checkElement.slideUp('normal'); return false; } if ((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('#menu ul:visible').not(checkElement.parentsUntil('#menu')).slideUp('normal'); checkElement.slideDown('normal'); return false; } }); $('.current-menu-item').parentsUntil('#menu').slideDown('normal'); var FullCurrentURL = window.location.href; var CurrentURLparts = FullCurrentURL.split("/"); var CurrentURLindex = CurrentURLparts.lengt

Categories : Misc

Getting selected dropdown value for custom attribute in Magento automatically
you can try below code <?php if ($_product->getData('attribute_name')): ?> <p><?php echo nl2br($_product->getResource()->getAttribute('attribute_name') ->getFrontend()->getValue($_product)) ?> </p>

Categories : PHP

Twitter Bootstrap Dropdown button and radio button
Button Dropdowns: <div class="btn-group"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> Action <span class="caret"></span> </a> <ul class="dropdown-menu"> <!-- dropdown menu links --> </ul> </div> I'm not sure what you are asking though in terms of radio buttons so I think you should read Bootstrap's Form documentation, available at http://twitter.github.io/bootstrap/base-css.html#forms

Categories : Javascript

Spring MVC+JSP, get selected value from dropdown menu
I'm not familiar with the form tag, does it work using this? @RequestMapping(value = "/admin/transferDevice/{deviceId}", method = RequestMethod.POST) public String transferForDevice(@PathVariable("deviceId") int deviceId, @RequestParam("users") String user) throws Exception { And maybe your form end tag should be under the form:select end tag.

Categories : Jsp

Bootstrap Dropdown get value of selected item
You should be able to change the dropdown text like this.. $(".dropdown-menu li a").click(function(){ var selText = $(this).text(); $(this).parents('.btn-group').find('.dropdown-toggle').html(selText+' <span class="caret"></span>'); }); Demo http://www.bootply.com/64302 How is the form being 'POST'ed?

Categories : HTML

Get the selected item of dropdown list from code behind
Your Select input which you add some options with JQuery to it, it is a Client side object and in no circumstances you can have access to it using code behind To access this object you have to add to property to your select input ID and runat=server thsese to property let you access your object from the code behind, you final select should be something like this <select id="select1" runat="server"> <option value="val1">dfgbfbff</option> </select> then in your code behind you can check its values with checking the select1

Categories : Asp Net

JQuery dropdown list selected item
js $(document).ready(function () { loc = $(location).attr('href'); var n = loc.split("/"); var n1 = loc.split("/").length; var on_page = n[n1 - 1]; var new_page = on_page.split("?"); $('nav ul a').each(function () { if ($(this).attr('href') == new_page[0]) { $(this).find('li').addClass('active'); } }); }); css .active { background:#ffca00; color:#2e2f34; padding:16px 12px; } Another code if you are working with # in the href js $(document).ready(function () { $('nav ul li').click(function () { $(this).parent().parent().find('.active').removeClass('active'); $(this).addClass('active'); }); }); Working Demo http://jsfiddle.net/XEy4s/

Categories : Jquery

Retrieving value from database and set dropdown selected item
Can you call DisplayMember on DDL? The below is syntax for a windows app. Where combobox is set up like a ddl. You need to tell what value to be binded. try //Try block for opening, querying and displaying pulled data { SqlConnection sqlConn = new SqlConnection("ConnString"); //Connection String sqlConn.Open(); using (SqlDataAdapter dataadapter = new SqlDataAdapter("Select * from Test_Names", sqlConn)) { var table = new DataTable(); a.Fill(table); comboBox1.DataSource = t; comboBox1.DisplayMember = "FirstName"; //name of Column/DisplayName comboBox1.ValueMember = "Firstname"; //Name of Column/Value }

Categories : Dotnet

Dropdown menu item reversal
You can use this: window.onload = function () { var select = document.getElementsByName('dropdown')[0]; var lastselected = select.value; select.onchange = function () { var newselected = select.value; if (confirm("Are you sure?")) { lastselected = newselected return true; } select.value = lastselected; } }; I added onload to it so it will run when page loads. I removed your inline js, more clean. So your html would be: <select name="dropdown"> <option value="0" selected>Eat</option> <option value="1">Work</option> <option value="2">Sleep</option> <option value="3">Enjoy</option> </select> DEMO HERE

Categories : Javascript

Selected item from spinner causes TextView to change automatically
Add android:prompt in Spinner xml and set a name like android:prompt="Privacy"; So first time it will show privacy then user can select from the drop down list.

Categories : Java

show selected item from dropdown as text binding
If I understand correctly, once a user has made a selection, you want the <select> to disappear, and a textual label to appear in its place. You will have to compute that label based on the selected Value, then display either the <select> or a text label, conditionally. HTML <!-- ko ifnot: SelectedListingText --> <select id="listingstatus" data-bind=" options: ListingTypeArray, optionsText: 'Text', optionsValue: 'Value', value: ListingType"></select> <!-- /ko --> <!-- ko if: SelectedListingText --> <span data-bind="text: SelectedListingText"></span> <!-- /ko --> Javascript Original Data var listArray = [ { "Selected": false, "Text": "Commercial", "Value": "4" }, { "Selected": false,

Categories : Knockout Js

Creating a CSS-only dropdown menu - one item disappears
Because your dropdown menu is contained within #header, which has the following rule: #header { overflow: hidden; } It cuts off the rest of the menu. Consider removing the overflow: hidden.

Categories : CSS

Using Dynamic Table Dropdown to Disable Radio Button
Can I see your html? Why do you have multiple id's in the first place? Anyways for (var i=0;i<tableb.rows.length;i++){ var roway = tableb.rows[i]; if($(roway).find("input#location").val()=='rr'){ alert("eeee"); } } In case you have only 1 input with that ID then a cleaner way is if($("input#location") && ("input#location").val() == 'rr') { alert('eeee'); }

Categories : Javascript

How to tell which radio button value is selected in my MVC controller?
you might wanna add value to your <input> so that you are able to choose which one got selected. <input type="radio" name="rdoOnline" value="option1"/> <input type="radio" name="rdoOnline" value="option2"/> You can then select base on the value and process accordingly.

Categories : Asp Net

How to get selected radio button value onclick from php
Check if the form has been submitted, if it has then use $_POST[] to access the data. See http://php.net/manual/en/reserved.variables.post.php You may want to include a submit button, this will allow you to check if the form has been submitted in the first place. echo "<form name='theater' method='POST' action='update.php'>"; echo '<input type="submit" value="Enter" name="submit">'; To check if (isset($_POST['submit'])) { //Do something } This will usually work, if it doesn't then try using a hidden field.

Categories : PHP

keep radio button selected across postback
I'm not sure really why you'd want to do it this way but you'd then save it in session this way: String selectedValue = rblYourRadioButtons.SelectedValue; Session["SelectedRadioButtonValue"] = selectedValue; Then, on postback or whenever, on the Item Databound of the gridview you check if the current row Id matches the value stored in the session, if it does then select that value in the radiobutton list. Personally I'd store the value in the DB rather than session.

Categories : C#

Finiding out which radio button is selected
var value = $('#selections form input:radio:checked').val(); Demo ----> http://jsfiddle.net/Trk6W/15/

Categories : Jquery

How do I show each item in a multi-select dropdown as already selected if it is in the database?
Remember that mysql_* familiy of functions is now deprecated, try using PDO. Seems you can use a JOIN statement and run a single query, please try this code: $db = new PDO('mysql:host=localhost;dbname=<SOMEDB>','<USERNAME>','PASSWORD'); $statement = $db->prepare("SELECT s.suppliers_id AS id, s.supplier_name AS name, u.unit_user_id AS user_id FROM suppliers s LEFT JOIN units_suppliers u USING suppliers_id WHERE (u.unit_user_id = :user_id OR u.unit_user_id IS NULL) GROUP BY s.supplier_name ORDER BY s.supplier_name"); if (isset($old_details['unit_user_id'])) { $user_id = $old_details['unit_user_id']; } else if (isset($_POST['old_unit_id'])) { $user_id = $_POST['unit_user_id']; } else { $user_id = 0; } $statement->execute(array( ':user_id' => $user_id )

Categories : PHP

How can I create a dropdown options menu from my action bar item?
Per the Defining Menus via XML Guide: You can add a submenu to an item in any menu (except a submenu) by adding a <menu> element as the child of an <item>. Submenus are useful when your application has a lot of functions that can be organized into topics, like items in a PC application's menu bar (File, Edit, View, etc.). They give an example XML of: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/file" android:title="@string/file" > <!-- "file" submenu --> <menu> <item android:id="@+id/create_new" android:title="@string/create_new" /> <item android:id="@+id/open" a

Categories : Android

How Android Spinner displays radio button in dropdown list
Here is the examples for custom spinner... http://easyandroidtutorials.blogspot.in/2012/05/custom-spinner-in-android.html http://androidexample.com/Custom_Spinner_With_Image_And_Text_-_Android_Example/index.php?view=article_discription&aid=84&aaid=107 http://www.edureka.in/blog/custom-spinner-in-android/ http://stephenpengilley.blogspot.in/2013/01/android-custom-spinner-tutorial.html http://androidgeisha.blogspot.in/2011/01/custom-spinner-row-layout-custom.html http://karanbalkar.com/2013/07/tutorial-39-create-custom-spinner-in-android/

Categories : Android



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