Search Results

Search found 27691 results on 1108 pages for 'multi select'.

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

  • Javascript to sort contents of select element

    - by Jangwenyi
    Hi, is there a quick way to sort the items of a select element? Or I have to resort to writing javascript? Please any ideas. <select size="4" name="lstALL" multiple="multiple" id="lstALL" tabindex="12" style="font-size:XX-Small;height:95%;width:100%;"> <option value="0"> XXX</option> <option value="1203">ABC</option> <option value="1013">MMM</option> </select>

    Read the article

  • Rails select list reverts to top?

    - by Danny McClelland
    Hi Everyone, I have number of select lists in my rails application like this: <li>Company<span><%= f.select :company_id, Company.all.collect {|m| [m.companyname, m.id]} %></span></li> They all work well, except - sometimes if you go to the edit view, the select list reverts to the top item, not the item that was chosen when creating. So if you go to an edit view and then click update without actually making any changes, the lists default to the top item - even though you didn't touch them. Is there a way around this? Thanks, Danny

    Read the article

  • SELECT only a certain set of rows at a time

    - by prmatta
    I need to select data from one table and insert it into another table. Currently the SQL looks something like this: INSERT INTO A (x, y, z) SELECT x, y, z FROM B b WHERE ... However, the SELECT is huge, resulting in over 2 millions rows and we think it is taking up too much memory. Informix, the db in this case, runs out of virtual memory when the query is run. How would I go about selecting and inserting a set of rows (say 2000)? Given that I don't think there are any row ids etc.

    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

  • SQL SELECT INSERTed data from Table

    - by Noam Smadja
    its in ASP Classic. MS-Access DB. i do: INSERT INTO Orders (userId) VALUES (123)" what i want to retrieve is orderNumber from that row. its an auto-increment number. so i did: SELECT orderNumber FROM Orders WHERE userId=123 but since it is on the same page, the SELECT returns: Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. i've seen somewhere RETURNING orderNumber as variable but it was for oracle and i dont know how to implement it into my asp :( set addOrder = Server.CreateObject("ADODB.Command") addOrder.ActiveConnection = MM_KerenDB_STRING addOrder.CommandText = "INSERT INTO Orders (userId) VALUES ("&userId&")" addOrder.CommandType = 1 addOrder.CommandTimeout = 0 addOrder.Prepared = true addOrder.Execute() Dim getOrderNumber Set getOrderNumber = Server.CreateObject("ADODB.Recordset") getOrderNumber.ActiveConnection = MM_KerenDB_STRING getOrderNumber.Source = "SELECT orderNumber FROM Orders WHERE userId=" & userId getOrderNumber.CursorType = 0 getOrderNumber.CursorLocation = 2 getOrderNumber.LockType = 1 getOrderNumber.Open() session("orderNumber") = getOrderNumber.Fields.Item("orderNumber").value

    Read the article

  • JQuery + Rails + Select Menu

    - by blackpond
    I want to have a select menu to change a field on a Customer dynamically, I've never used Jquery with a select menu, and I'm having problems. The code: <% form_for @customer , :url = { :action = "update" }, :html ={:class = "ajax_form"} do |f| % Pricing: <%= select :customer, :pricing, Customer::PRICING, {}, :onchange = "$('this').closest('form').submit();" % Application.js: $(document).ready(function(){ $(".ajax_link").live("click",function(event){ //take div class = ajax_link and call this funciton when clicked. event.preventDefault(); // cancels http request $.post($(this).attr("href"), null, null, "script"); return false; }); ajaxFormSubmitHooks(); }); function ajaxFormSubmitHooks(){ $(".ajax_form").submit(function(event){ event.preventDefault(); // cancels http request $.post($(this).attr("action"), $(this).serializeArray(), null, "script"); return false; }); }

    Read the article

  • Multi-Select Dropdown with size of 1

    - by Thomas
    Is there any way of creating a combo box (<select>) with a size of 1? All the examples I can find allow for multiple selects but with a number of options visible at any one time. If this cannot be accomplished with bog standard HTML is it possible in a JS library such as JQuery?

    Read the article

  • loading input from multi choice

    - by dankyy1
    Hi I have a task as that a dropdown list to choose an input type selections are textbox datetime number while choosing one of those types, I have to open the selected input(for example if user chose datetime I have to open a datetime input) For this task which is most suitable using aspview(each input type one view) for each one a usercontrol so when user select a type loading it's usercontrol at runtime or do you have any better ideas?

    Read the article

  • Multi lined Multi styled button

    - by user1321811
    Hi i'm trying to recreate this button style more specifically the 'view basket' button. waitrose app The button needs to have multiple lines of text each with a different text size and font colour etc. Here's the code so far. I've created the button and its displays correctly but when you click on it the state pressed isn't working. Where am I going wrong. Thanks in advance. xml button file: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:state_pressed="true" android:state_focused="true" android:background="@drawable/button_bg" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Some Text" android:state_pressed="false" android:state_focused="false" android:textColor="#ffffff" /> <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Some Text" android:state_pressed="false" android:state_focused="false" android:textColor="#ffffff" /> </LinearLayout> java file code: package com.buttons2; import com.buttons2.R; import android.app.Activity; import android.os.Bundle; import android.widget.Button; public class Buttons2Activity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button) findViewById(R.id.button1); setContentView(R.layout.button); } }

    Read the article

  • Prototype Multi-Event Observation for Multi-Elements

    - by Phonethics
    ['element1','element2','element3'].each(function(e){ Event.observe(e, 'click', function(event){ ... }); Event.observe(e, 'blur', function(event){ ... }); Event.observe(e, 'mousedown', function(event){ ... }); Event.observe(e, 'mouseover', function(event){ ... }); }); Is there a way to reduce this so that I can do ['element1','element2','element3'].each(function(e){ Event.observe(e, ev, function(event){ switch(e){ switch (ev) } }); }); ?

    Read the article

  • Automatic multi-page multi-column flowing text with QtWebkit (HTML/CSS/JS -> PDF)

    - by Peter Boughton
    I have some HTML documents that are converted to PDF, using software that renders using QtWebkit (not sure which version). Currently, the documents have specific tags to split into columns and pages - so whenever the wording changes, it is a manual time-consuming process to move these tags so that the columns and pages fit. Can anyone provide a way to have text auto-wrapped into the next column/page (as appropriate) when it reaches the bottom of the current container? Any HTML, CSS or JS supported by QtWebkit is ok (assuming it works in the PDF converter). (I have tested the webkit-column-* in CSS3 and it appears QtWebkit does not support this.) To make things more exciting, it also needs to: - put a header at the top of each page, with page X of Y numbering; - if an odd number of pages, add a blank page at the end (with no header); - have the ability to say "don't break inside this block" or "don't break after this header" I have put some quick example initial markup and target markup to help explain what I'm trying to do. (The actual documents are far more complicated than that, but I need a simple proof-of-concept before I attack the real ones.) Any suggestions? Update: I've got a partially working solution using Aaron's "filling up" suggestion - I'll post more details in a bit.

    Read the article

  • Sign Up/Login system for multi-domain/multi-server

    - by David
    I'm thinking about a good solution for implementing a sign up/login system that works across different domains and servers. A working example is Olx (you can register in one domain, and your login will work in the rest of domains). The scenario is that every domain (one per country) has its own database. And there will be 2 servers (for example), each one will have the 50% of the domains (and so the 50% of databases). What would you suggest to start with? Database: MySQL 5.1 Server-side language: PHP 5.3 (I will be using Symfony 1.4, so if someone has some suggestion for this framework, it will be interesting too, although it is optional)

    Read the article

  • using multi-markers with multi info-windows

    - by mohsen
    I have an array of info-windows corresponding to an array of markers. Now, I have a problem, I use the below code to generate an info-window, when clicking on the marker all the markers disappear unless one, also when I click on that marker there is no info-window come out. What is the wrong with my code ? or what shall I do ? Any answer will be very appreciated, Thanks in advance. This code is inside a for loop: infoWindoArray[i][j] = new google.maps.InfoWindow({ content:"Lat: "+this.position.lat() + "\nLng: " + this.position.lng() + "\n"+ this.customInfo, }); google.maps.event.addListener(AllMarkers[i][j], 'click', (function(x) { return function() {infoWindoArray[i][j].open(map,AllMarkers[i][j]);} })(x));

    Read the article

  • exporting html table multi line columns to excel multi line cells

    - by Passat
    I have a html table in a view MVC4 that I am sending to excel as output. Inside the view page I have some columns that have multiple lines that are built with forloops within the HTML. What's the best way to add the or \r\n so that excel renders it correctly? I have a table and inside I build each row looping thru a recordset. In each row I also loop thru different recordsets to populate columns within each row so that some of the columns may contain more than one value and they should show in different lines in the table that will export to excel.

    Read the article

  • SQL SERVER – Select and Delete Duplicate Records – SQL in Sixty Seconds #036 – Video

    - by pinaldave
    Developers often face situations when they find their column have duplicate records and they want to delete it. A good developer will never delete any data without observing it and making sure that what is being deleted is the absolutely fine to delete. Before deleting duplicate data, one should select it and see if the data is really duplicate. In this video we are demonstrating two scripts – 1) selects duplicate records 2) deletes duplicate records. We are assuming that the table has a unique incremental id. Additionally, we are assuming that in the case of the duplicate records we would like to keep the latest record. If there is really a business need to keep unique records, one should consider to create a unique index on the column. Unique index will prevent users entering duplicate data into the table from the beginning. This should be the best solution. However, deleting duplicate data is also a very valid request. If user realizes that they need to keep only unique records in the column and if they are willing to create unique constraint, the very first requirement of creating a unique constraint is to delete the duplicate records. Let us see how to connect the values in Sixty Seconds: Here is the script which is used in the video. USE tempdb GO CREATE TABLE TestTable (ID INT, NameCol VARCHAR(100)) GO INSERT INTO TestTable (ID, NameCol) SELECT 1, 'First' UNION ALL SELECT 2, 'Second' UNION ALL SELECT 3, 'Second' UNION ALL SELECT 4, 'Second' UNION ALL SELECT 5, 'Second' UNION ALL SELECT 6, 'Third' GO -- Selecting Data SELECT * FROM TestTable GO -- Detecting Duplicate SELECT NameCol, COUNT(*) TotalCount FROM TestTable GROUP BY NameCol HAVING COUNT(*) > 1 ORDER BY COUNT(*) DESC GO -- Deleting Duplicate DELETE FROM TestTable WHERE ID NOT IN ( SELECT MAX(ID) FROM TestTable GROUP BY NameCol) GO -- Selecting Data SELECT * FROM TestTable GO DROP TABLE TestTable GO Related Tips in SQL in Sixty Seconds: SQL SERVER – Delete Duplicate Records – Rows SQL SERVER – Count Duplicate Records – Rows SQL SERVER – 2005 – 2008 – Delete Duplicate Rows Delete Duplicate Records – Rows – Readers Contribution Unique Nonclustered Index Creation with IGNORE_DUP_KEY = ON – A Transactional Behavior What would you like to see in the next SQL in Sixty Seconds video? Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Database, Pinal Dave, PostADay, SQL, SQL Authority, SQL in Sixty Seconds, SQL Query, SQL Scripts, SQL Server, SQL Server Management Studio, SQL Tips and Tricks, T SQL, Technology, Video Tagged: Excel

    Read the article

  • Multiple dependent select boxes, the Rails way?

    - by Adam Carlile
    Hey Guys I am trying to create a car application, each car belongs to a make and model, but only certain makes have certain models. So I would like a series of select boxes that are populated dynamically based on the previous, however I also would like to add another record to that select box if you cant find the one you want. I would just like to know your thoughts on how to accomplish this in a rails way? Cheers Adam

    Read the article

  • select multiple columns using linq and sum them up

    - by Yustme
    Hi, How can i select multiple columns and calculate the total amount. For example, in my database i got a few fields which are named: 5hunderedBills, 2hunderedBills, 1hunderedBills, etc. And the value of those fields are for example: 5, 2, 3 And the sum would be: 5hunderedBills * 5 + 2hunderedBills * 2 + 1hunderedBills * 3 How can i do that with LINQ in one select statement?

    Read the article

  • Is my understanding of "select distinct" correct?

    - by paxdiablo
    We recently discovered a performance problem with one of our systems and I think I have the fix but I'm not certain my understanding is correct. In simplest form, we have a table blah into which we accumulate various values based on a key field. The basic form is: recdate date rectime time system varchar(20) count integer accum1 integer accum2 integer There are a lot more accumulators than that but they're all of the same form. The primary key is made up of recdate, rectime and system. As values are collected to the table, the count for a given recdate/rectime/system is incremented and the values for that key are added to the accumulators. That means the averages can be obtained by using accumN / count. Now we also have a view over that table specified as follows: create view blah_v ( recdate, rectime, system, count, accum1, accum2 ) as select distinct recdate, rectime, system, count, value (case when count > 0 then accum1 / count end, 0), value (case when count > 0 then accum2 / count end, 0) from blah; In other words, the view gives us the average value of the accumulators rather than the sums. It also makes sure we don't get a divide-by-zero in those cases where the count is zero (these records do exist and we are not allowed to remove them so don't bother telling me they're rubbish - you're preaching to the choir). We've noticed that the time difference between doing: select distinct recdate from XX varies greatly depending on whether we use the table or the view. I'm talking about the difference being 1 second for the table and 27 seconds for the view (with 100K rows). We actually tracked it back to the select distinct. What seems to be happening is that the DBMS is actually loading all the rows in and sorting them so as to remove duplicates. That's fair enough, it's what we stupidly told it to do. But I'm pretty sure the fact that the view includes every component of the primary key means that it's impossible to have duplicates anyway. We've validated the problem since, if we create another view without the distinct, it performs at the same speed as the underlying table. I just wanted to confirm my understanding that a select distinct can not have duplicates if it includes all the primary key components. If that's so, then we can simply change the view appropriately.

    Read the article

  • Change event on <select>

    - by adivasile
    If i attach a change event listener on a<select> how do i acces the option that was selected (not just the value, the actual element). $('select').addEvent('change',function(event) { //?? }); Note: i'm using Mootools

    Read the article

  • Query MSQL for winners, starting at xth place using SELECT

    - by incrediman
    In my MySQL table Winners, I have a list of people who have won. What I'd like to do is select a list of the names of 10 winners. So what I have right now is this: SELECT name FROM Winners ORDER BY points DESC LIMIT 10 This returns the first 10 winners which is great. But how can I make it (for example) return 10 winners, but starting at 20th place?

    Read the article

  • Select back things that _don't_ exist

    - by bobobobo
    I have this table. I want to select back the items that don't exist already, so I can create them. table tags +---------+-------+ | tagId | name | | 1 | C | | 2 | DX | | 3 | CG | Say SQL looks like: select name from tags where name in ( 'C', 'CG', 'RX' ) You get back 'C' and 'CG', so you know you have to create 'RX'. Is there a way to get a MySQL statement like this to return 'RX' instead, when 'RX' doesn't already exist?

    Read the article

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