Search Results

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

Page 4/1108 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Get all Select Elements in a Form by referencing $(this) instead of $("form select")

    - by DaveDev
    Hi Guys I'm currently getting all the Select elements that exist in a form with the following: $("form").submit(function(event) { // gather data var data = GetSelectData($("form select")); // do submit $.post($(this).attr("action"), data, ..etc) }); Instead of passing in $("form select"), is there a way I can say something like $(this).children('select') // this doesn't work, btw to get all the select elements that exist within the context of the form the submit event is executing for? This will allow me to reduce my code to the following, moving all the functionality into a common function: $("form").submit(function(event) { GatherDataAndSubmit($(this)); }); function GatherDataAndSubmit(obj) { var data = GetSelectData(obj.children('select')); $.post(obj.attr("action"), data, ..etc) } Thanks Dave

    Read the article

  • jQuery: show an element from select drop down, hide it when other option selected

    - by Ricardo Zea
    I've tried looking around and there are similar problems, but mine is way more simple, but yet, I can't find a solution within these forums. While learning jQuery, I'm trying to show a DIV when an item/option from a select drop down is selected, and hide that same DIV when any other option in the select drop down is selected. select HTML: <select name="source" id="source"> <option value="null" selected="selected">&mdash;Select&mdash;</option> <option value="s1">Source 1</option> <option value="s2">Source 2</option> <option value="sother">Other</option> </select> DIV I need to show when 'Other' is selected: <div id="specify-source">Other source here...</div> When any other option in the select menu is selected, the above DIV shouldn't be visible. I've tried this jQuery but of course it doesn't work properly: $(function() { $.viewMap = { 'sother' : $('#specify-source') }; $('#source').change(function() { // hide all $.each($.viewMap, function() { this.hide(); }); // show current $.viewMap[$(this).val()].show(); }); }); Any help you can give me, I'd greatly appreciate it. Thanks,

    Read the article

  • jQuery Mobile and Select menu with URLs

    - by user1907347
    Been battling with this for a while now. I'm trying to get a select menu to work as a navigation menu but I cannot get the URLs to work and have it actually change pages. In the head: <script> $(function() { $("#select-choice-1").click(function() { $.mobile.changePage($("#select-choice-1")); }); }); </script> With this Menu: <div id="MobileWrapper" data-role="fieldcontain"> <select name="select-choice-1" id="select-choice-1" data-theme="a" data-form="ui-btn-up-a" data-mini="true"> <option data-placeholder="true">Navigation</option><!-- data=placeholder makes this not show up in the pop up--> <option value="/index.php" data-ajax="false">Home</option> <option value="/services/index.php" data-ajax="false">Services</option> <option value="/trainers/index.php" data-ajax="false">Trainers</option> <option value="/locations/index.php" data-ajax="false">Locations</option> <option value="/calendar/index.php" data-ajax="false">Calendar</option> <option value="/contactus/index.php" data-ajax="false">Contact Us</option> </select> </div><!--END MobileWrapper DIV-->

    Read the article

  • Issues resolving DNS entries for multi-homed servers

    - by I.T. Support
    This is difficult to explain, so bear with me. We have 2 domain controllers, each multi-homed to straddle 2 internal subnets, (subnet A and subnet B) and provide dns, dhcp, and ldap authentication. Both domain controllers each have 2 DNS entries. both entries have identical host names, but correspond to subnet A & subnet B respectively (example entries shown): dc1 host 192.168.8.1 dc1 host 192.168.9.1 dc2 host 192.168.8.2 dc2 host 192.168.9.2 We also have a 3rd subnet for our dmz, (subnet C) which neither domain controller has an IP address on, but our firewall/routing tables provide access to subnet A from subnet C and vice versa, but don't allow access to subnet B from subnet C. Here's my issue. How can I force/determine which dns entry is used when a server on subnet C queries either domain controller by host name? Right now it seems to randomly pick one of the two entries, swaps out the name for the IP address and that's that. The problem is if it randomly selects the entry that corresponds to the 9.x subnet B (no access from subnet C), then the server fails to resolve. If it picks the entry for the 8.x subnet A then it resolves (firewall/routing tables defined for communication between these 2 subnets) Here's what I'd like to know: What are Best Practices (if any) for dealing with DNS resolution on subnets that the DNS servers don't have a presence on? Can I control something akin to a metric value to force an order of DNS resolution when there are multiple entries for the same host name that correspond to different IP subnets? Should I even have 2 DNS HOST entries for the same name? Here's what I'd like to avoid: Making edits to the HOSTS files of servers on subnet C to force DNS resolution of the hostname to the appropriate subnet Adding NIC's to the DC's to have them straddle the DMZ as well, thus obtaining a third DNS entry that corresponds to subnet C Again, my apologies if this was too verbose / unclear. Thanks!

    Read the article

  • Walkthrough/guide building aplication server for multi tenant web app [on hold]

    - by Khalid Adisendjaja
    The web app will detect a subdomain such as tenant1.app.com, tenant2.app.com, etc to identify tenant environment, each tenant environment will have a different database credential (port,db name,etc) but still connecting to the same database server. Each tenant should use app.com for their main domain, using their own domain is prohibitted. Each tenant will have their own rest api endpoint such as tenant1.app.com/api/v1/xxxx, tenant2.app.com/api/v1/xxxx, tenant3.app.com/api/v1/xxxx I've come to a simple solution by setting a wildcard subdomain (*.app.com) on webserver Apache/Nginx vhost configuration file. I have googled so many concept for building a multi-tenant app server but still don't understand how to really done it, what is the right way to do it and what is actually required to do this task. So I've come to this questions, Do I need a proxy server, dns masking, etc.. How to monitor each tenants activity What about server performance, load balancing, and scalability How to setup ssl certificate for each tenant what about application cache for each tenant Is it reliable to use the setup for production etc ... I have a very litte experience on server infrastructure, so I'm looking for a DIY walkthrough, step by step guide, or sophisticate solution ready to implemented for production

    Read the article

  • multi boot: xp + xp + xubuntu, how to?

    - by Jassano
    My laptop (with a single harddrive) currently has xp + xubuntu dual boot. I want to make that triple boot: xp + xp + xubuntu Please don't ask why, take it as given. How can I accomplish this triple boot? I tried using gparted to add a partition (worked!), used dd to clone the xp install to the new partition (worked!), edited grub (my bootloader) to list a third entry pointing to the correct device (worked!). But regardless of which of the two xp entries in grub I select I still get booted into one and the same XP. The files for the other XP show up under D: so I know they're there alright. I have edited the boot.ini on the new partition so everything looks to be in order. What do I need to do to change that and make both xp instances bootable in this scenario?

    Read the article

  • MySQL: select words as rows even som are "new line" separated in one field

    - by Tillebeck
    Hi I have a table with a field where words are written separated with new lines. So a select on this single field from to rows will output 3 lines for first row and 2 lines for second row: Row1 designationer nye kolonier mindre byer Row2 udsteder bopladser I would like to do a select that select all these lines as if they had been rows in the table like: SELECT do_the_split(field) FROM table so the result would be more like: Row1 designationer Row2 nye kolonier Row3 mindre byer Row4 udsteder Row5 bopladser is there any way to do this in MySQL? BR. Anders

    Read the article

  • Javascript: Select option based on its contents

    - by Zac Altman
    Basically this, but in pure javascript: http://stackoverflow.com/questions/2346257/how-to-get-value-of-select-tag-based-on-content-of-select-tag-using-nokogiri So I have a select list with a lot of countries/states, and I want to be able to select one based on what is between the tags. Argentina (I know i could use the value, but each one is a random mesh of numbers, so i would have to collect each individual one - not economical...)

    Read the article

  • NUmber of rows in Oracle SQL Select?

    - by twelshesgi
    I need to nkw how many records were returned in a select in oracle. Currently, I do two queries: SELECT COUNT(ITEM_ID) FROM MY_ITEMS; SELECT * FROM MY_ITEMS; I need to know the COUNT but I hate doing two queries. Is there a way to do: SELECT * FROM MY_ITEMS and then find out how many records are in there?

    Read the article

  • Is select function internaly call tcp connect ?

    - by Syedsma
    Code Sinnpet: int CreateaTCPSocket() { int iSockID = ACE_OS::socket(......); ACE_OS::set_flags(iSockID,O_NONBLOCK); ACE_OS::bind(); if (ACE_OS::connect(iSockID ,....) < 0) { if (ACE_OS::select(.....,timeout) <= 0) { return INVALID_HANDLE; } } return iSockID; } My question is when connect is failed for non-block error and select is called and say select return success then again we need to call connect or select function internal do connect?

    Read the article

  • my multi boot can't boot to XP 'resumeobject' is missing

    - by GwenKillerby
    In my multi boot set up, booting to vista and 7 goes fine, but when I try to boot to XP, i get an error Windows failed to start. A recent hardware or software change might be the cause. To fix the problem: 1. Insert your Windows installation disc and restart your computer. 2. Choose your language settings, and then click "Next." 3. Click "Repair your computer." If you do not have this disc, contact your system administrator or computer manufacturer for assistance. File: \NTLDR Status: 0xc000000e Info: The selected entry could not be loaded because the application is missing or corrupt. See below. Clearly the resumeobject seems to be missing in the XP entry ("Real Mode Boot sector"), only I don't know how to restore it. Vista is on **C:**, Win7 is on **F:** (as is the bootmgr ??? ) and WinXP is on **E:** What I've tried: [1] I've used about 5 windows discs, that is the Recovery Consoles from real XP install CD's and 3 virtual Recovery Consoles. All failed. The real CD's work ONE time, but won't let me finish, I only got as far as [b]fixboot E:[/b] Then they shut the laptop down, I kid you not. On a next startup, all 5 CD's ask me for some Admin password that I've never added! [2] I have VisualBCD and EasyBCD, but the most obvious things I tried there didn't solve the problem. So know I don't exactly know what to do with them. [3] I CAN boot into XP with the FIX NTLDR workaround of http://milescomer.com/tinyempire.com/notes/ntldrismissing.htm, but it doesn't fix it permanently QUESTION: How do I fix it permanently? bcdedit /enum output: Windows Boot Manager -------------------- identifier {bootmgr} device partition=F: path \bootmgr description Windows Boot Manager locale en-US default {current} displayorder {current} {812e27a9-27b7-11e4-8fb4-dfa8174ae8dc} {812e27ac-27b7-11e4-8fb4-dfa8174ae8dc} timeout 30 resume No Windows Boot Loader ------------------- identifier {current} device partition=C: path \Windows\system32\winload.exe description Vista locale nl-NL osdevice partition=C: systemroot \Windows resumeobject {73d8b5bc-2764-11e4-b181-806e6f6e6963} Windows Boot Loader ------------------- identifier {812e27a9-27b7-11e4-8fb4-dfa8174ae8dc} device partition=F: path \Windows\system32\winload.exe description Daisy Etta locale en-US osdevice partition=F: systemroot \Windows resumeobject {b8c234a4-27b0-11e4-b8b3-806e6f6e6963} Real-mode Boot Sector --------------------- identifier {812e27ac-27b7-11e4-8fb4-dfa8174ae8dc} device partition=E: path \NTLDR description XP Thank you.

    Read the article

  • SQL Queries SELECT IN and SELECT NOT IN

    - by Sequenzia
    Does anyone know why the results of the following 2 queries do not add up to the results of the 3rd one? SELECT COUNT(leadID) FROM leads WHERE makeID NOT IN (SELECT uploadDataMapID FROM DG_App.dbo.uploadData WHERE uploadID = 3 AND uploadRowID = 1) AND modelID NOT IN (SELECT uploadDataMapID FROM DG_App.dbo.uploadData WHERE uploadID = 3 AND uploadRowID = 2) SELECT COUNT(leadID) FROM Leads WHERE makeID IN (SELECT uploadDataMapID FROM DG_App.dbo.uploadData WHERE uploadID = 3 AND uploadRowID = 1) OR modelID IN (SELECT uploadDataMapID FROM DG_App.dbo.uploadData WHERE uploadID = 3 AND uploadRowID = 2) SELECT COUNT(leadID) FROM Leads The first query is the count I need. The second one is to tell the user how many records were suppressed based on the contents of the DG_App.dbo.uploadData table. The third query is just a straight count of all the records. When I run these the results of query 1 + the results of query 2 comes up about 46K records less than the count of the entire table. I have played with grouping the WHERE statements with () but that did not change the counts at all. This is MSSQL Server 2012. Any input on this would be great. Thanks

    Read the article

  • performance issue: difference between select s.* vs select *

    - by kamil
    Recently I had some problem in performance of my query. The thing is described here: poor Hibernate select performance comparing to running directly - how debug? After long time of struggling, I've finally discovered that the query with select prefix like: select sth.* from Something as sth... Is 300x times slower then query started this way: select * from Something as sth.. Could somebody help me, and asnwer why is that so? Some external documents on this would be really useful. The table used for testing was: SALES_UNIT table contains some basic info abot sales unit node such as name and etc. The only association is to table SALES_UNIT_TYPE, as ManyToOne. The primary key is ID and field VALID_FROM_DTTM which is date. SALES_UNIT_RELATION contains relation PARENT-CHILD between sales unit nodes. Consists of SALES_UNIT_PARENT_ID, SALES_UNIT_CHILD_ID and VALID_TO_DTTM/VALID_FROM_DTTM. No association with any tables. The PK here is ..PARENT_ID, ..CHILD_ID and VALID_FROM_DTTM The actual query I've done was: select s.* from sales_unit s left join sales_unit_relation r on (s.sales_unit_id = r.sales_unit_child_id) where r.sales_unit_child_id is null select * from sales_unit s left join sales_unit_relation r on (s.sales_unit_id = r.sales_unit_child_id) where r.sales_unit_child_id is null Same query, both uses left join and only difference is with select.

    Read the article

  • Select Box not filling properly in rails

    - by CaptnCraig
    I am creating a select box for a form using this in _form.html.erb <%= f.select(:category_id,options_for_select(@cats)) %> @cats is an array created in my controller like this: @cats = [] categories.each do |c| @cats.push([c.full_name,c.id]) end The select box is properly filled, and the selected foreign key is even properly saved to the database. The problem is, when I come back in my edit action, the select box is moved back to the first item in the list, not the one corresponding to category_id. Reading the documentation it seems like this should just magically work. How do I get it to select the proper value?

    Read the article

  • Generate a merge statement from table structure

    - by Nigel Rivett
    This code generates a merge statement joining on he natural key and checking all other columns to see if they have changed. The full version deals with type 2 processing and an audit trail but this version is useful. Just the insert or update part is handy too. Change the table at the top (spt_values in master in the version) and the join columns for the merge in @nk. The output generated is at the top and the code to run to generate it below. Output merge spt_values a using spt_values b on a.name = b.name and a.number = b.number and a.type = b.type when matched and (1=0 or (a.low b.low) or (a.low is null and b.low is not null) or (a.low is not null and b.low is null) or (a.high b.high) or (a.high is null and b.high is not null) or (a.high is not null and b.high is null) or (a.status b.status) or (a.status is null and b.status is not null) or (a.status is not null and b.status is null) ) then update set low = b.low , high = b.high , status = b.status when not matched by target then insert ( name , number , type , low , high , status ) values ( b.name , b.number , b.type , b.low , b.high , b.status ); Generator set nocount on declare @t varchar(128) = 'spt_values' declare @i int = 0 -- this is the natural key on the table used for the merge statement join declare @nk table (ColName varchar(128)) insert @nk select 'Number' insert @nk select 'Name' insert @nk select 'Type' declare @cols table (seq int, nkseq int, type int, colname varchar(128)) ;with cte as ( select ordinal_position, type = case when columnproperty(object_id(@t), COLUMN_NAME,'IsIdentity') = 1 then 3 when nk.ColName is not null then 1 else 0 end, COLUMN_NAME from information_schema.columns c left join @nk nk on c.column_name = nk.ColName where table_name = @t ) insert @cols (seq, nkseq, type, colname) select ordinal_position, row_number() over (partition by type order by ordinal_position) , type, COLUMN_NAME from cte declare @result table (i int, j int, k int, data varchar(500)) select @i = @i + 1 insert @result (i, data) select @i, 'merge ' + @t + ' a' select @i = @i + 1 insert @result (i, data) select @i, ' using cte b' select @i = @i + 1 insert @result (i, j, data) select @i, nkseq, ' ' + case when nkseq = 1 then 'on' else 'and' end + ' a.' + ColName + ' = b.' + ColName from @cols where type = 1 select @i = @i + 1 insert @result (i, data) select @i, ' when matched and (1=0' select @i = @i + 1 insert @result (i, j, k, data) select @i, seq, 1, ' or (a.' + ColName + ' b.' + ColName + ')' + ' or (a.' + ColName + ' is null and b.' + ColName + ' is not null)' + ' or (a.' + ColName + ' is not null and b.' + ColName + ' is null)' from @cols where type 1 select @i = @i + 1 insert @result (i, data) select @i, ' )' select @i = @i + 1 insert @result (i, data) select @i, ' then update set' select @i = @i + 1 insert @result (i, j, data) select @i, nkseq, ' ' + case when nkseq = 1 then ' ' else ', ' end + colname + ' = b.' + colname from @cols where type = 0 select @i = @i + 1 insert @result (i, data) select @i, ' when not matched by target then insert' select @i = @i + 1 insert @result (i, data) select @i, ' (' select @i = @i + 1 insert @result (i, j, data) select @i, seq, ' ' + case when seq = 1 then ' ' else ', ' end + colname from @cols where type 3 select @i = @i + 1 insert @result (i, data) select @i, ' )' select @i = @i + 1 insert @result (i, data) select @i, ' values' select @i = @i + 1 insert @result (i, data) select @i, ' (' select @i = @i + 1 insert @result (i, j, data) select @i, seq, ' ' + case when seq = 1 then ' ' else ', ' end + 'b.' + colname from @cols where type 3 select @i = @i + 1 insert @result (i, data) select @i, ' );' select data from @result order by i,j,k,data

    Read the article

  • Need help with a conditional SELECT statement

    - by Ethan
    I've got a stored procedure with a select statement, like this: `SELECT author_ID, author_name, author_bio FROM Authors WHERE author_ID in (SELECT author_ID from Books) ` This limits results to authors who have book records. This is the Books table: Books book_ID INT author_ID INT book_title NVARCHAR featured_book BIT What I want to do is conditionally select the ID of the featured book by each author as part of the select statement above, and if none of the books for a given author are featured, select the ID of the first (top 1) book by the author from the books table. How do I approach this?

    Read the article

  • Rails - Active Record :conditions overrides :select

    - by Nick
    I have a fairly large model and I want to retrieve only a select set of fields for each record in order to keep the JSON string I am building small. Using :select with find works great but my key goal is to use conditional logic with an associated model. Is the only way to do this really with a lamda in a named scope? I'm dreading that perhaps unnecessarily but I'd like to understand if there is a way to make the :select work with a condition. This works: @sites = Site.find :all, :select => 'id,foo,bar' When I try this: @sites = Site.find :all, :select => 'id,foo,bar', :include => [:relatedmodel], :conditions => ["relatedmodel.type in (?)", params[:filters]] The condition works but each record includes all of the Site attributes which makes my JSON string way way too large. Thanks for any pointers!

    Read the article

  • Select Menu, go to url on select with JQuery?

    - by Keith Donegan
    Hey Guys, I have the following html: HTML markup <ul id="test"> <li><a href="http://www.yahoo.com">yahoo</a></li> <li><a href="http://www.google.com">Google</a></li> </ul> And some JS code: JQuery/JavaScript Code $('ul#test').each(function() { var select=$(document.createElement('select')).insertBefore($(this).hide()); $('>li a', this).each(function() { option=$(document.createElement('option')).appendTo(select).val(this.href).html($(this).html()); }); }); This code produces a select dropdown menu, exactly what I want, but my question is how do I go to the url on select? So if I click yahoo, it brings me to yahoo.com? Thanks for your help!

    Read the article

  • select row from table and substitute a field with one from another column if it exists

    - by EarthMind
    I'm trying construct a PostgreSQL query that does the following but so far my efforts have been in vain. Problem: There are two tables: A and B. I'd like to select all columns from table A (having columns: id, name, description) and substitute the "A.name" column with the value of the column "B.title" from table B (having columns: id, table_A_id title, langcode) where B.table_A_id is 5 and B.langcode is "nl" (if there are any rows). My attempts: SELECT A.name, case when exists(select title from B where table_A_id = 5 and langcode= 'nl') then B.title else A.name END FROM A, B WHERE A.id = 5 and B.table_A_id = 5 and B.langcode = 'nl' -- second try: SELECT COALESCE(B.title, A.name) as name from A, B where A.id = 5 and B.table_A_id = 5 and exists(select title from B where table_A_id = 5 and langcode= 'nl') I've tried using a CASE and COALESCE() but failed due to my inexperience with both concepts. Thanks in advance.

    Read the article

  • Which index is used in select and why?

    - by Lukasz Lysik
    I have the table with zip codes with following columns: id - PRIMARY KEY code - NONCLUSTERED INDEX city When I execute query SELECT TOP 10 * FROM ZIPCodes I get the results sorted by id column. But when I change the query to: SELECT TOP 10 id FROM ZIPCodes I get the results sorted by code column. Again, when I change the query to: SELECT TOP 10 code FROM ZIPCodes I get the results sorted by code column again. And finally when I change to: SELECT TOP 10 id,code FROM ZIPCodes I get the results sorted by id column. My question is in the title of the question. I know which indexes are used in the queries, but my question is, why those indexes are used? I the second query (SELECT TOP 10 id FROM ZIPCodes) wouldn't it be faster if the clusteder index was used? How the query engine chooses which index to use?

    Read the article

  • Using PHP to populate a <select></select> ?

    - by Flins
    <select name="select"> </select> I want to populate the above tag with values from database. I have written php code up to this. while($row=mysql_fetch_array($result)) { } $row is fetching fetching correct values.. how to add it to the <select> please help... Am new to programming

    Read the article

  • use a sql select statement to get parameters for 2nd select statement

    - by diver-d
    Hi there, I am trying to write a sql statement that I have 2 tables Store & StoreTransactions. My first select command looks like SELECT [StoreID],[ParentStoreID] FROM Store Very simple stuff. How do I take the returned StoreID's and use them for my 2nd select statement? SELECT [StoreTransactionID],[TransactionDate],[StoreID] FROM StoreTransactions WHERE StoreID = returned values from the above query Any help would be great!

    Read the article

  • Change DIV contents on SELECT change

    - by Ian Batten
    I'm looking for a method of how to change the contents of a div when an option on a select dropdown is selected. I came across the following: <script type="text/javascript" src="jquery.js"></script> <!-- the select --> <select id="thechoices"> <option value="box1">Box 1</option> <option value="box2">Box 2</option> <option value="box3">Box 3</option> </select> <!-- the DIVs --> <div id="boxes"> <div id="box1"><p>Box 1 stuff...</p></div> <div id="box2"><p>Box 2 stuff...</p></div> <div id="box3"><p>Box 3 stuff...</p></div> </div> <!-- the jQuery --> <script type="text/javascript" src="path/to/jquery.js"></script> <script type="text/javascript"> $("#thechoices").change(function(){ $("#" + this.value).show().siblings().hide(); }); $("#thechoices").change(); </script> This worked fine on it's own, but I want to use it with the following script: http://www.dynamicdrive.com/dynamicindex1/chainedmenu/index.htm When using it alongside this chainedmenu script, it just loads all of the DIV box contents at once, rather than each div option when a SELECT option is chosen. Any ideas on what I can use alongside this chainedmenu script to get different DIV contents to show for different SELECT options? Thanks in advance, Ian EDIT Here is a test page: http://freeflamingo.com/t/new.html

    Read the article

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