select

Finding option within select options fails in Chrome and works in IE.. why?

I have a select list with multiple items which I want to be able to filter by the text entered into some text field. This is pretty simple if you just do a js contains while iterating over each option. There are however in some cases a lot of options, so I employed jQuery: var results = $("#myList options").find("option[text*=" + some...

Ajax update (prototype) for select box, the CakePHP way

I'm quite newby with ajax in cakephp and what I want to do is update one select form input element when user changes other. I have managed to do it previously with JQuery but I can't use it on this form, because it seems to conflict with prototype library that is used by $ajax->autoComplete() on one form element. I couldn't get it to w...

SELECT / GROUP BY - segments of time (10 seconds, 30 seconds, etc)

I have a table (MySQL) that captures samples every n seconds. The table has many columns, but all that matters for this is two: a time stamp (of type TIMESTAMP) and a count (of type INT). What I would like to do, is get sums and averages of the count column over a range of times. For instance, I have samples every 2 seconds recorded...

how to hide textareas if checkboxes not checked - JQuery

Hi, I'm trying to use jQuery to look at a form and for each of the checkboxes 'if checked' then show a div containing a textarea. Each div for checkbox id 'checkbiox_foo' is id 'checkbox_foo_reasons' I'm a total noob at jquery so I've got this far but I can't select the div to hide or show it. $(document).ready(function() { $('#stor...

SELECT with JOIN

Hi all, I want to build a query using Zend_db_select and JOIN. The database is as follows: [AUTHOR table] pk: 'id' attr: 'name' [BOOK table] pk: 'id' attr: 'name' fk: 'author.id' I have author.name as a parameter. I want to retrieve all related books (only book.name, not the other columns) Please help. Thanks ...

Counting nodes with certain attribute values in XSLT

Suppose I have some XML like this: <section name="SampleSection"> <item name="ScoredItem1"> <attributes> <scored data_type="boolean" value="true"/> </attributes> </item> <item name="UnscoredItem1"> <attributes> <scored data_type="boolean" val...

How to apply different styles to options of select tag in HTML

Hello All: I am trying to apply some CSS class on the options of a drop down. The CSS apply correctly in Firefox, but in IE (7, 8) only color is getting applied. Can any body tell me how to apply styles on options of drop down for IE 7 and IE 8. .regionOption { font-weight: bold; } .countryOption { margin-left: 10px; p...

finding the length of a form select element using javascript

i've tried several different variations of finding the length of a select element and nothing's working! i can't figure out why, since several websites list this is as the correct code. here's the javascript: <script type="text/javascript"> alert(document.getElementById("opentimes").options.length); </script> and here's the form...

Using php to create a Folder select list - including child folders?

Hi all, I'm trying to use scandir to display a select list of folders listed in a specific directory (which works fine) however, I need it to also add the child folders (if there are any) into my select list. If anyone could help me, that would be great! This is the structure I want: <option>folder 1</option> <option> --child 1</opti...

how do a select option selection pick from some other page using html and js only?

Hi friends, I have to main pages in html with course details. One (X) page has html select option with all courses. If i select in any pages and any one course to apply, then i redirect to X page to user that option has selected by default in X page. I have idea to pass value in url, but how can i retrive the correct option in X pag...

Select and Options Styling

How to style the select options ? i want alternating background colors in the drop down menu. ...

Oracle SELECT query: collapsing NULL values when pairing up dates for different fields

This question is very much like my previous question, but a bit more complicated. Rob van Wijk's answer worked perfectly for my other question, and I've been using that as a starting point. My problem now is that I am pivoting dates for different fields. Whereas before I cared about getting all open_in and open_out values for a given ...

jQuery: Updating an option's text inside a select after the option has already been added?

I've searched all around for a solution and have found nothing. Here is some sample code: $('#myselect').append( '<option id=\'myoption\'></option>' ); $('#mytextfield').change(function() { $('#myoption').html($(this).val); }); so, i want to change the select option's html whenever my text field is changed. any ideas? thanks! ...

Mysql Many to Many Query

I have a many to many table setup in my mysql database. Teams can be in many games and each game has 2 teams. There is a table in between them called teams_games. SHOW CREATE TABLE information follows. I have been messing with this query for a while. At this point I don't care if it requires sub-queries, joins, or unions. I have tried a...

SQL isset and not showing blank 'cells'

Hi all, I'm using one of my MySQL database tables as an actual table, with times of the day as each column, and one column called day. You guessed it, in day it says the day of the week, and in the rest of the cells it says what is happening at that time. What I want to do is only show the cells that have value in it. In my case, I'm al...

Get the row count of a select... group by mysql statement

I have a table of products which contains some 2000 clothing products, each product has a grpIdent field and a productGroup field. when I run the following query: select count(1) from tblclothingitems ci where productGroup='hel' group by productGroup, grpIdent I get a resultset of 99 rows, according to SQL Yog, containing differen...

Size of drop down box on select element.

Hey everyone. How do you set the size of the drop down box on a select element? Not the select element itself but the drop down box part of it when you click for options? ______________ |____________| input box | | | | | | |____________| size of drop down box containing options Thank you for your help...

Select statement not working in Sqlite

i have a table with 19 columns. if i query using select * from tab where id=1; i'm able to obtain all the attribute values. whereas, if i query using select name from tab where id=1; i get no output. (name is defined as of type text in the schema) i don understand what the hell is going wrong.. ...

How can i select from string?

Dim str as string = "<request id=value1 type=value2>value3</request>" How could select the values as follows... Dim id as string = get the value of id (value1) Dim type as string = get the value of type (value 2) Dim ReadValue3 as string = get the value3 ...

Mysql Select Query problem

I am using this below given query: SELECT o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.google_order_id, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name FROM orders o, orders_status s, customers c WHERE o.customers_id = c.customers_id AND o.orders_status = s.orders_status_id AND...