Search Results

Search found 1524 results on 61 pages for 'dropdown'.

Page 7/61 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • dropdown list box to display in the row..

    - by kumar
    Please can any body tell me is this right what I am doing here.. I need to display a dropdown list box in each row in the grid var lastsel2; $("#table1").jqGrid({ scroll: 1, sortable: true, url: '/friends/names/shiva', datatype: "json", mtype: 'GET', height: 200, autowidth: false, pager: '#page', colNames: [//columns names here ], colModel: [ { name: 'A', index: '', width: 90 }, { name: 'B', index: '', width: 100 }, { name: 'C', index: '', width: 70 }, { name: 'D', index: '', width: 65}, { name: 'E', index: '', width: 105}, { name: 'F', index: '', width: 105 }, { name: 'G', index: '', width: 100 }, { name: 'H', index: '', width: 70}, { name: 'I', index: '', width: 60}, { name: 'J', index: '', width: 60}, { name: 'K', index: '', width: 40 }, { name: 'L', index: '', width: 70}, { name: 'M', index: '', width: 60 }, { name: 'N', index: '', edittype: 'select',editype:true, width: 100, editoptions: { value: { 1: 'AA', 2: 'CC',3:'BD''}} } ], onSelectRow: function(Acct_Code) { if (A&& A !== lastsel2) { $('#table1').restoreRow(lastsel2); $('#table1').editRow(A, true); lastsel2 = A; } }, Here i am not able to see the dropdown box in row click? Thanks

    Read the article

  • Watir question regarding selecting a hidden dropdown.

    - by AJ
    Hi, I have two dropdowns, the second dropdown does not show until a choice is made from the first one. Using watir, i can select the first dropdown, and when i watch it, the second one becomes active, but it cannot select it. i just tried the regular select_list using name and id. Here is the code for the second drop down. <td> <input type="hidden" value="1" name="list" id="list"> <script type="text/JavaScript" language="JavaScript"></script> <select> <option value="">1</option> <option value="2">2</option> <option value="3">3</option> </select> </td> I've also notice the value for the hidden field change as i select different options. Thanks for any help

    Read the article

  • SSRS 2005 concat values in dropdown parameter

    - by Mac
    Hi All, I have a dataset which I want to use as a parameter for my chart in SSRS. The puzzle that I am trying to solve is as below. My DataSet has 4 columns and in the Dropdown parameter I can only specify label and value. I am not able to specify two columns as Label and two columns as value. Does anyone know how to concat the values in the dropdown? I don't want to concat these values in my sql query generating the dataset.

    Read the article

  • Change the value of a dropdown if it is equal to something

    - by Jake Neal
    Sorry if this question has already been asked and answered, but I couldn't find anything specifically for my needs. I have a form that has placeholders and javascript to make sure the form isn't submitted with the placeholders still there. There is a dropdown box that has the value of 'Best time to call'. What I want to do is if this value is passed as the default, I want it to change to something like "n/a" or a blank value. I have achieved this with the comments box using the following javascript, but it doesn't seem to work the same for the dropdown: var comments=document.getElementById('comments').value; if (comments=="Comments") { document.getElementById('comments').value=""; } This isn't a required field so I can't have an alert come up, so I just need to value to be changed if submitted as 'Best time to call'. Hope I have explained everything correctly

    Read the article

  • Dropdown binding and postbacks - ASP.NET

    - by DotnetDude
    I have a rather complex page. The ASPX page loads a user control which in turn loads a child User control. Parent Control protected override void OnInit(EventArgs e) { //Loads child control } In the child user control, I use custom control that inherits from System.Web.UI.HtmlControls.HtmlSelect ASCX: <cust:CustDropDownList id="ctlDdl" runat="server"/> ASCX.CS protected void Page_Load(object sender, EventArgs e) { //Binds CtlDdl here } When the user clicks on the Save button, the controls get user controls get dynamically reloaded, but Iose the value the user has selected in the dropdown. I run into the chicken and egg problem here. I think I need to bind the ctlDdl only on if its not a postback, but that results in the dropdown not getting populated. If I bind it everytime, then i lose user's selection EDIT: Can someone respond to my comment to Jonathan's answer? Thanks

    Read the article

  • Selenium selected option in dropdown not displayed correctly

    - by luckyfool
    I have the following issue with Selenium Webdriver. There are two dropdown menus on a page i am testing "brand" and "items". The options of "items" depend on which brand you choose. I am trying to iterate through all possible choices and print brand-item pairs. I use two possible ways to pick an option from each dropdown menu Using Select(): def retryingSelectOption(name,n): result=False attempts=0 while attempts<5: try: element=Select(driver.find_element_by_name(name)) element.select_by_index(n) print element.all_selected_options[0].text result=True break except StaleElementReferenceException: pass attempts+=1 return result And using .click(): def retryingClickOption(name,n): result=False attempts=0 while attempts<5: try: driver.find_element_by_name(name).find_elements_by_tag_name("option")[n].click() result=True break except StaleElementReferenceException: pass attempts+=1 return result My problem is that at ,what seem to me as random moments (sometimes it works sometimes it does not), even though the above functions return True and printing out the selected option shows me the correct answer, the browser still displays the previous option. So basically Selenium tells me i have picked the right option but the browser displays the previous one.No idea what is wrong.

    Read the article

  • JQuery not copying state dropdown list 1 to DDL2 on checkbox change

    - by user1001411
    I've looked at similar posts on the subject but none of the recommended solutions have worked for me so I'm not sure where I'm going wrong. I have a billing and shipping address form with a dropdown list for the state. Upon checking/unchecking the "billing address same as shipping" everything copies over except the state dropdown list. The state dropdown list is populated from a SQLDataSource state table. Here's my code: <script type="text/javascript" language="javascript" src="../Scripts/jquery-1.4.1.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $('input:checkbox[id*=chkCopy]').change(function () { if ($(this).is(':checked')) { $('input:text[id*=TextBox5]').val($('input:text[id*=TextBox1]').val()); $('input:text[id*=TextBox7]').val($('input:text[id*=TextBox2]').val()); $('input:text[id*=TextBox9]').val($('input:text[id*=TextBox3]').val()); $('input:text[id*=TextBox12]').val($('input:text[id*=TextBox4]').val()); $('select#DropDownList6').val($("select#DropDownList1").val()); $('input:text[id*=TextBox14]').val($('input:text[id*=TextBox6]').val()); } else { $('input:text[id*=TextBox5]').val(''); $('input:text[id*=TextBox7]').val(''); $('input:text[id*=TextBox9]').val(''); $('input:text[id*=TextBox12]').val(''); $('select#DropDownList6').val(''); $('input:text[id*=TextBox14]').val(''); } }); }); and here is my SQL for the DDL: <asp:DropDownList ID="DropDownList1" runat="server" DataTextField="Descr" DataValueField="ID" DataSourceID="SqlDataSource1" Width="254"> </asp:DropDownList> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString1 %>" SelectCommand="SELECT * FROM [xrefState]"> </asp:SqlDataSource> the other one: <asp:DropDownList ID="DropDownList6" runat="server" DataTextField="Descr" DataValueField="ID" DataSourceID="SqlDataSource5" Width="254"> </asp:DropDownList> <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString1 %>" SelectCommand="SELECT * FROM [xrefState]"> </asp:SqlDataSource>

    Read the article

  • Dropdown list with a "Select All" option

    - by shawnboy
    I have three dropdown boxes, Region, District, and City. I want my District dropdown to have a "Select All" option so the user can get all Cities in the Region, else just display the City based on the selected District. My query looks like this: IF @district =-2 THEN (SELECT DISTINCT city FROM myTable WHERE RIGHT(Region, 3) = ?) ORDER BY city) ELSE (select DISTINCT city FROM myTable WHERE District = ?) Order by city I'm using vb.net/sql I couldn't find any complex case scenarios in my search either. Any sugguestions would be appreciated!

    Read the article

  • trying to set a dropdown in MVC

    - by RJ
    I almost have this solved but need a little push. Here's what I have: In the database I have a field called active that is a bit field (True/False) I have placed a dropdownlist on the View form like this: <%= Html.DropDownList("lstActive", new SelectList((IEnumerable)ViewData["ActiveList"])) %> In my controller, I simply have this code to generate the True/False in the dropdown: List<string> activeList = new List<string>(); activeList.Add("True"); activeList.Add("False"); ViewData["ActiveList"] = new SelectList(activeList); I want to bind to the field in the database called active and select it in the dropdown. When I view it like this I get this: So the questions are these: Obviously I am not pointing to the Value and Text property but what is that in this case? And how do I select the value that is in the database? Any help would be appreciated.

    Read the article

  • SubSonic Change DropDown Value for Load Drops SUB

    - by GTJR
    I used the subsonic generator to create some aspx pages, It works fine. On some of the pages it automaticaly generated the dropdown boxes for foreign key values. How Can change that value in the load drops code? Or where I need to change it. For instance I have a workers table and a workersweek table. The workers table has a workerid,firstname and lastname field and the workersweek has a workerID field. The generator automatically set it up to show the firstname in the dropdown. I want to change the value to be both firstname and lastname. I am sure I will have to add code that does something like firstname + " " + Lastname. I am just not sure where to do it withing the code that was generated. I see the load drops sub, but it does not seem like that is the one I need to modify.

    Read the article

  • Handling "other" option in dropdown select with free text input field

    - by ted776
    Hi, I'm trying to figure out the best way to handle a dropdown list where one of the options "other" shows a hidden text field (via jQuery), where the user can then enter text. Should both the dropdown and the input field be given the same "name" attribute, then server side code runs a check on the values of each in order to know what one is the active value - e.g if the value of the select box is "other", then check the value of the text input field - if this isn't the default value ("enter text"), then it's ok to use this value and save it to the database. Is this a messy approach to this problem?

    Read the article

  • Geting SelectList to MVC view using AJAX/jQuery

    - by Chris
    Hi all. I have a C# MVC application which is populating a dropdown based on a date selected. Once the date is selected I am sending it to an action via AJAX/jQuery. The action gets a list of items to return for that date. Here is where my problem is. I have done it previously where I render a partial view from the action and pass it the SelectList as the model. However, I really just want to do it inline in the original view, so I'm hoping there is some way I can return the SelectList and from there do some magic Javascript/JQuery to put it into a dropdown. Has anybody ever done this before? If so, what do I on the client end after calling the load() to return the SelectList? I've done something like this previously, when I was just returning a string or other value to be rendered as straight text: $("#returnTripRow").load("/Trip.aspx/GetTripsForGivenDate?date=" + escape(selection)); But I'm not sure how to intercept the data and morph it into am Html.DropDown() call, or equivalent. Any ideas? Thanks, Chris

    Read the article

  • <optgroup> Not working in jQuery Dropdown

    - by Santhosh Kumar
    I have a asp:dropdownlist which i have changed to jQuery multiselect. I have to group the data inside the dropdown. I am grouping this in runtime.If it is a normal asp dropdown its working. When applying jquery Multiselect its dosen't. Source: <link rel="stylesheet" type="text/css" href="Styles/jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="Styles/jquery.multiselect.filter.css" /> <link rel="stylesheet" type="text/css" href="Styles/style.css" /> <link rel="stylesheet" type="text/css" href="Styles/prettify.css" /> <%--<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>--%> <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="Scripts/jquery.multiselect.js"></script> <script type="text/javascript" src="Scripts/jquery.multiselect.filter.js"></script> <script type="text/javascript" src="Scripts/prettify.js"></script> <script type="text/javascript"> $(document).ready(function () { //Create groups for dropdown list $("option[classification='LessThanFive']").wrapAll("<optgroup label='Less Than Five' />"); $("option[classification='GreaterThanFive']").wrapAll("<optgroup label='Greater Than five' />"); }); </script> <asp:DropDownList ID="MobileData" runat="server" OnDataBound="ddl_DataBound"> </asp:DropDownList> //Code Behind: protected void ddl_DataBound(object sender, EventArgs e) { foreach (ListItem item in ((DropDownList)sender).Items) { if (System.Int32.Parse(item.Value) < 2) item.Attributes.Add("classification", "LessThanFive"); else item.Attributes.Add("classification", "GreaterThanFive"); } } protected void Page_Load(object sender, EventArgs e) { ListItemCollection list = new ListItemCollection(); list.Add(new ListItem("1", "1")); list.Add(new ListItem("2", "2")); list.Add(new ListItem("3", "3")); list.Add(new ListItem("4", "4")); list.Add(new ListItem("5", "5")); list.Add(new ListItem("6", "6")); list.Add(new ListItem("7", "7")); list.Add(new ListItem("8", "8")); list.Add(new ListItem("9", "9")); list.Add(new ListItem("10", "10")); MobileData.DataSource = list; MobileData.DataBind(); } Where i'm wrong?

    Read the article

  • JQGrid: Dropdown for selecting items from a foreign table - DataValueField vs DataTextField

    - by Herb Caudill
    Suppose Items and ItemTypes have numeric primary keys ItemID and ItemTypeID. Each Item is assigned an ItemType. I have a JQGrid to edit Items. When not in edit mode, I would like to see the name of the ItemType, not the ItemTypeID: TYPE | TITLE -----------+-------------------- Category A | Item 1 Category A | Item 2 Category B | Item 3 Category B | Item 4 In edit mode, I want to see a dropdown that displays the ItemType text, but that returns the ItemTypeID to the server. Here's what I have so far (using the ASP.NET wrapper for JQGrid): <trirand:jqgrid id="Grid1" runat="server" ... > <columns> <trirand:jqgridcolumn datafield="ItemID" editable="false" visible="false" width="50" primarykey="true" /> <trirand:jqgridcolumn datafield="ItemTypeID" editable="true" edittype="DropDown" editorcontrolid="ItemTypes" /> <trirand:jqgridcolumn datafield="Title" editable="true" sortable="true" /> ... </columns> </trirand:jqgrid> <asp:sqldatasource runat="server" id="ItemTypesDatasource" connectionstring="<%$ ConnectionStrings:Main %>" selectcommand="Select ItemTypeID,Title from ItemTypes order by Title" /> <asp:dropdownlist runat="server" id="ItemTypes" datasourceid="ItemTypesDatasource" datavaluefield="ItemTypeID" datatextfield="Title" /> The problem is that when not in edit mode, it displays the numeric ItemTypeID, rather than the text labels: TYPE | TITLE -----------+-------------------- 100123 | Item 1 100123 | Item 2 100124 | Item 3 100124 | Item 4 Is there any way to have JQGrid respect the distinction between DataValueField and DataTextField? (Either using the jQuery API or the ASP.NET plugin.)

    Read the article

  • Update CGridView when a dropdown value changes

    - by Gautam Borad
    I have a CGridView with columns from a table "product" => {'product_id','category_id',...} I have another table "category" => {'category_id','category_name'} category_id is the FK in the product table. Now i want a dropdown list of the category table and on selecting a particular value the CGridView of product should be updated to show only the rows with that category_id. I also need the column filtering/sorting for the CGridView to work (using AJAX). I was able to refresh the CGridView when a value is selected from the dropdown, however i am not able to send the category_id with the 'data' for the CGridView: clientScript-registerScript('search', " $('.cat_dropdown').change(function(){ $.fn.yiiGridView.update('order-grid', { data: $(this).serialize(), }); return false; }); "); The data: $(this).serialize() sends only the values that are present in the filtering text fields of the CGridView. How do i append the category_id with it? If the above method is not the right one, please suggest an alternative method.

    Read the article

  • Shopify: Replacing Product Radio Buttons With Dropdown Select

    - by Wade D Ouellet
    Hi, With Shopify I am trying to alter my product template to display a dropdown select list instead of radio buttons for my product variants. I managed to do this but when you try and add a product to the cart from the list it says, "No variant ID was passed." Here is the code for their radio buttons: <ul id="product-variants"> {% for variant in product.variants %} <li> {% if variant.available %} <input type="radio" name="id" value="{{variant.id}}" id="radio_{{variant.id}}" style="vertical-align: middle;" {%if forloop.first%} checked="checked" {%endif%} /> <label for="radio_{{variant.id}}"><span class="sku">{{ variant.sku }}</span> {%if variant.title != 'Default' %}{{ variant.title }} for {%endif%} <span class="price">{{ variant.price | money_with_currency }}</span></label> {% else %} <del style="margin-left: 26px">{{ variant.title }}</del>&nbsp;<span>Sold Out!</span> {% endif %} </li> {% endfor %} </ul> Here is the code for my dropdown select at this point: <select id="product-variants"> {% for variant in product.variants %} <li> {% if variant.available %} <option value="{{variant.id}}" selected="selected"><span class="sku">{{ variant.sku }}</span> {%if variant.title != 'Default' %}{{ variant.title }} for {%endif%} <span class="price">{{ variant.price | money_with_currency }}</span></option> {% else %} <del style="margin-left: 26px">{{ variant.title }}</del>&nbsp;<span>Sold Out!</span> {% endif %} </li> {% endfor %} </select> Thanks, Wade

    Read the article

  • MVC nhibernate entiry mapping for dropdown list

    - by Rod McLeay
    Hi, I have a dropdown list on an ASP.NET MVC project that I am pretty sure is not binding to my model because of my nhibernate mapping. I have tried many variations on the asp mvc side resulting in this post here. MVC side of things seems fine I believe the issue may be that my object is trying to bind, but my mapping is out of whack. My mapping is: <many-to-one name="Project" lazy="false" class="AgileThought.ERP.Domain.Property.Project" column="ProjectGUID" /> My View gives an error saying that the GUID from the dropdownList selected value is not valid. Which I think may be that it is trying to push the GUID into my related project object. The value 'fd38c877-706f-431d-b624-1269184eeeb5' is invalid. My related project list binds to the dropdown list just fine, it is just not binding to my models Project entity. Does the related Project entity need to know about its relationship? Its really just a lookup list. Many thanks for your time and best regards, Rod

    Read the article

  • ASP.NET MVC Page - Dropdown control doesn't function with Keyboard Arrow Keys

    - by Rita
    Hi I have a page that has a Dropdown control (ddlDeliveryMethod). So that when the user selects particular option from the Dropdown(using MOUSE), the respective Div ID's are loaded. But instead of Mouse, if we simply use the arrow keys from Keyboard, the respective DIV ID's are not showing. Is there any workaround for this. Appreciate your responses. Here is my code: // based on Delivery method, display the respective fields $("#ddlDeliveryMethod").change(function() { $('#divRegisteredMail').hide(); $('#divRegisteredEmail').hide(); $('#divRegisteredFax').hide(); $('#divSaveForFuture').hide(); switch ($("#ddlDeliveryMethod ").val()) { case ' -- Select one -- ': break; case 'Email': $('#divRegisteredEmail').show(); break; case 'Mail': $('#divRegisteredMail').show(); break; case 'Fax': $('#divRegisteredFax').show(); break; default: caption = "default"; break; } });

    Read the article

  • Loading default value in a dropdown and calling onchange event

    - by J. Davidson
    Hi i have following dropdown <div class="fcolumn"> <label class="text" for="o_Id">Months:</label> <select class="textMonths" id="o_Id" name="periodName" > <option value="000">Select Period--</option> </select> </div> In the following jquery, first it loads fnLoadP() in a drop down list. Than as a default I am loading one of the values in drop down which is '10'. It loads too as default value. But it should be executing $("#o_Id").change.. which it doesn't. $(document).ready(function () { var sProfileUserId = null; $("#o_Id").change(function () { //---- }); fnLoadP(); $("select[name='pName']").val('10'); }); }); Basically my goal is. After dropdown values are loaded, to load '10' as default value and call onchange event in the dom. Please let me know how to fix it.

    Read the article

  • Dropdown list bound to object data source - how to update on a button click

    - by Jen
    This is probably something really stupidly simple.. I have a drop down list bound to an object data source. I have set AppendDataBoundItems to true so that I can have an initial select. <asp:DropDownList ID="Accommodations1" runat="server" AutoPostBack="true" DataTextField="AccommodationTypeDescription" DataValueField="Id" OnDataBound="Accommodations1_DataBound" onSelectedIndexChanged="Accommodations1_SelectedIndexChanged" Width="200px" DataSourceID="AccommodationDs" AppendDataBoundItems="true"> <asp:ListItem Text="Select" Value=""></asp:ListItem> </asp:DropDownList> <asp:ObjectDataSource ID="AccommodationDs" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="ListByPropertyId" TypeName="PropertyAccommodationController"> <SelectParameters> <asp:Parameter Name="PropertyId" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource> I have a button which adds an accommodaton - so after that happens I need the dropdown list to update to include the new accommodation. So I've tried calling databind on the dropdownlist, and databind on the datasource - and nothing is making this dropdown list update. eg. PropertyAccommodations1.DataBind(); Could someone please let me know what I'm doing wrong. Originally I thought it was due to an update panel issue.. but I've removed the update panel and it still doesn't work (and checked the master page doesn't include an update panel). Thanks!!

    Read the article

  • PHP Dropdown menu [closed]

    - by rShetty
    <br><h2>Select a Tag</h2></br> <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("portal", $con); $query = "SELECT tag_name FROM tags"; $result = mysql_query($query); ?> <select name="tag_name" id="abc"> <option size=30 selected>Select</option> <?php while($array = mysql_fetch_assoc($result)){ ?> <option value ="<?php echo $array['tag_name'];?>"><?php echo $array['tag_name'];?> </option> <?php } ?> </select> <br><br> This is a snippet of code for getting the dropdown menu in the page. I have a database named portal and table named tags with tag_name as the attribute. Do help me to find the error in the program. I am not getting the tag_names in the dropdown menu

    Read the article

  • Changing a Select dropdown with a jquery ui slider

    - by Chris J. Lee
    Trying to set a select dropdown with a slider. You move the jquery ui slider and then it will change the selection of the other two dropdowns. is there a current method in jquery that would set these options? Current dropdown: <select id="alert-options-frequency-opts"> <option value=""></option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select>

    Read the article

  • Dropdown menu not showing when using position: absolute;

    - by Xiy
    I've just turned my website into a responsive layout and along the way I've somehow managed to make my dropdown menus not work. When hovering over 'Drop-downs' they don't display unless I'm using position: relative. They worked before using position: absolute - but it seems they only work with position relative now. When using relative it uses the width which messes up the navigation bar. Using relative: http://d.pr/i/tp5R Using absolute: http://d.pr/i/j7r1 CSS for my sub-menu div.left_first_header ul.sub-menu { width: 125px; top: 14px; z-index: 2; height: 100%; position: absolute; -webkit-border-radius: 0px 0px 4px 4px; -moz-border-radius: 0px 0px 4px 4px; background: url(images/drop_down_bg.jpg); padding-left: 15px; padding-right: 15px; background-repeat: repeat; } jQuery for the drop down functionality jQuery(document).ready(function ($) { jQuery("ul.dropdown li").hover(function() { $('ul:first',this).css('visibility', 'visible'); }, function() { jQuery(this).removeClass("hover"); jQuery('ul:first',this).css('visibility', 'hidden'); }); }); My website http://wpvault.com/kahlam/ Considering it's 4am I've probably made a really stupid simple mistake. I apologise if I've missed anything.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >