select

Javascript loop limit to delete select list keeps changing

Hi, im trying to delete a HTML select list. This is what im using: var size = DID(SourceDiv + Number).options.length; DeleteSelectElements(SourceDiv+Number,size); function DeleteSelectElements(Div,Len){ var k; var Length = Len for (k = 0; k < Length; k++) { DID(Div).options[k] = null; } } DID just returns ...

Onclick in select not working in IE

Hi guys, Am a bit new to javascript. This question might sound a bit too silly, but I'm not able to figure it out why the following doesn't work in IE and works in firefox.. <select multiple="multiple"> <option value="tx" onClick="alert('tx');">Texas</option> <option value="ak" onClick="alert('ak');">Alaska</option> <option value="ca...

reverse match of multiple words

Thanks for reading this. Hope you can help me. When I have a Mysql table with these row values id| search ======== 1| butterflies 2| america 3| birds of america 4| america butterflies how can I tell which rows have all the words in column 'search' occuring in the string "butterflies of america", regardless of the number or order of the...

mysql optimisation

Hi guys, I have a photo gallery with 1.5 million photos so we are talking a big database. We want to make it so that people once they have uploaded a photo can upload into several different areas of the site. Photos also have attributes and tags and we have a tables for that as well. here is the layout PHOTO TABLE photo_id image status...

LINQ: Select <contition> OR <condition>

Pseudo code: SELECT * FROM 'table' WHERE ('date' < today) OR ('visible' = false) How do you do OR in Linq? ...

How do I select all the columns from a table, plus additional columns like ROWNUM?

Hey guys, I'm sure this is an easy question, but I have looked around and haven't found a way to do it. In Oracle, I know it's possible to do a select statement that returns the row number as a column in your result set. Example: select rownum, column1, column2 from table Returns: rownum column1 column2 1 Joe...

How do I post to a form and populate a select multiple?

I'm doing something a bit strange here, I'm querying data out of my local database and posintg it to Salesforce form using cURL. The data posts correctly to Salesforce. However, the select multiple is not getting the correct values selected. See $sd["location"] below in my code: //init curl $ch = curl_init(); //setup the p...

Prevent Multiple Selections of Same Value

I am working on a project where I have a form that will have multiple 'select' inputs, all with the same set of options. I would like to use jquery to disable/hide an option in the rest of the 'select' inputs, if it has already been selected. For example: <select id="1"> <option value="volvo">Volvo</option> <option value="saab">Sa...

Get option value AND text with PHP

Let's say I have a HTML form: USA CDN And I select option 1 (USA) Then a php page Ok, duh, works fine and echo's "1" How can I display "USA" as well? So in essence, I want to pass along the option's TEXT also. How could I do this? ...

jQuery: Storing content of select-box to variable?

I have a select field at my HTML page that is populated with a few default items. With the help of AJAX, I replace the content (options) in the select field with appropriate options. How can I store the contents (options) of my select field into a variable and then load it into the select again? It would be helpful to be able to get bac...

PDO to Zend_Db_Select with JOIN

I have this query: SELECT groups.name categories.name, categories.label FROM groups JOIN categories ON (categories.group1 = groups.id OR categories.group2 = groups.id) AND groups.label = :section AND categories.active = 1 Now, this is my JOIN using Zend_Db_Select but it gives me array error $select...

How to get value of select element and how to act on change?

Having a problem with the change() event in jQuery: $("select[name=cmm]").change(function(){ total(); }); For some reason the "total" function isn't being called with the code above. The html code is: <select name="cmm"> <option value="none">none</option> <option value="one">the first</option> <option value="t...

HTML Select returning user-visable text not value field

I am having an issue with a SELECT tag in an HTML form on an ASP page. This will have varying numbers of options under it, and is generated dynamically from a database. Code below; <select name='select1' id='select1' size='10'> <option value="12345678901234567890">User-Friendly Text 1</option> ... <option value="100000393737...

Jquery: is there a way to highlight the text of a Div when you click on it?

With Jquery is there a way to highlight/select(like if someone were to select it with the mouse) the text inside of a div that i click on? not a textbox, just a normal div. i'm trying to make a 'short url' box, where when someone clicks on the textarea, it highlights all the text, but it also needs to NOT allow people to change the text...

Using Jquery to test two select items and their values and return result from within one of two arrays?

Hi All, This has got me for some reason the code below is translating the currency variable to a string and then not getting the actual value from the self named variable... $("#quantity").change(function() { var euroPrice = new Array("12.95", "14.95", "18.95", "21.95"); var gbpPrice = new Array("10.95", "11.95", "16.95", "18.9...

mysql binary comparison doesnt use index

I have the following query: EXPLAIN EXTENDED SELECT * FROM ( `photo_data` ) LEFT JOIN `deleted_photos` ON `deleted_photos`.`photo_id` = `photo_data`.`photo_id` WHERE photo_data.photo_id = 'UKNn' AND `deleted_photos`.`photo_id` IS NULL I unfortunately have to use binary to compare this photo_id (which is being handed to me from a diffe...

Oracle: How to find values present in an external list but not present in a column?

I have a table my_table with column my_column and a large list my_list of LONGs. I'd like to find all values that present in the my_list but not present in the my_table.my_column. How can I do that with SQL without repeating huge list of LONGs twice? Please shed some light as I'm Oracle beginner. Thank you. EDIT: my_list is just a shor...

jQuery select box replacement

Hi, Im looking for a recommendation for jQuery select box replacement. Ive previously used the one over at BrainFault ( http://www.brainfault.com/jquery-plugins/jquery-selectbox-replacement/ ). However, from using it and a little research into it, it is pretty bug ridden and would not recommended using it myself. Any advice appreciate...

How to set selected value to multiple Select inputs with jQuery?

Hi, I have 2 select inputs and I filling them with an array of years. After that I want to set currentYear the selected value for every Select. I hacve this code but only works with first Select I don't understand why. EDIT 2 Everything works great with jQuery 1.4.3, 1.4.2 fails :_( EDIT I'm trying this without success :-( only fisr...

Why select * into faster than pure select

Why select * into faster than pure select?? ...