Select element onchange
How can i acces an select element if it has been selected? var select = document.getElementById("select"); if(select.selected == true) doesnt work any idea? ...
How can i acces an select element if it has been selected? var select = document.getElementById("select"); if(select.selected == true) doesnt work any idea? ...
I have a products objects which belongs to certain categories i.e. classical many to one relationship. @Entity public class Product{ @Id @GeneratedValue(strategy = GenerationType.AUTO) Long id; String name; Double price; @ManyToOne(fetch = FetchType.LAZY) Category category; ... } @Entity public class Categ...
Hey all, I'm attempting to repopulate a drop down menu. I'm making an ajax call to retrieve myList. When I have the new list, I remove all the options from the select element and insert the new values (about 100 options). This works great on later versions of IE and Firefox; the refresh is almost instant. However, on IE6, these oper...
I'm trying to query my database to get some results in Chinese and Japanese languages as follows: $str = '日本'; $get_character = mysql_fetch_array (mysql_query("SELECT id FROM `mytable` WHERE ch = '$str'")); print $get_character[0]; The problem is it returns me nothing. For testing purpose I've changed 日本 in database to test and I do ...
I have a sql like this: SELECT *, count(*) as cc FROM manytomany GROUP BY aid, bid ORDER BY cc DESC which return all records with the count #. however, what can I do if I only want to get the ones with count > 1? ...
I have an array with as set of users and their respective karma: $some_array = Array ( [user_id] => Array ( [0] => 4 [1] => 3 [2] => 5 [3] => 1 ) [karma] => Array ( [0] => 129 [1] => 87 [2] => 13 [3] => 20 ...
Okay, I am abit confusing here. In my database I have 5 rows of this data => "[email protected]" (all lower case), and This is my code, Query 1 (I am using php and mysql): $str = '[email protected]'; $sel = mysql_query("SELECT COUNT(*) FROM table WHERE `column` = '{$str}'"); $num = mysql_num_ro...
Hi! Some drop down lists on my project have so many options that I'm changing those to input texts with an autocomplete function (using jquery autocomplete plugin). But, in drop down lists I can use a change event and use its value to fire an ajax function, for example. But, with an autocomplete, I don't know how to do that and I want ...
Hello! I have an SQL Query like this: SELECT TOP (@TopType) AdvertID, IsAdvertImage, AdvertData FROM Adverts WHERE AdvertSize = @AdvertSize ORDER BY NEWID() Each row in the table Adverts also has a column called Views, is it possible to also increase views with 1 for the banners that has been fetched? So I set TopType to 4 and get 4 ...
Hi, as the title says, How do I disable the select button text in a gridview after clicking it once? I want to click it once, then have the select cell area render an image (and the image not clickable or linking to anything). Any ideas? protected void Page_Load(object sender, EventArgs e) { dn = new holdDataContext(); if (!(P...
I'm using PHP to fetch data from a database. Here is the code: <?php $db = new SQLiteDatabase("testDB.db"); $query = $db->query("SELECT * FROM blog ORDER BY blogdate DESC"); while($entry = $query->fetch(SQLITE_ASSOC)) { //only one blog entry per day echo "<a href=\"display.php?date=".$entry['blogdate']."\">".$ent...
I want to select a group of rows around a row matched on conditions, ie select a row and then return 5 records before and after it. More info as requested (sorry bout that!) Ok, so the table records lap times from a race. Laps are related to Users (users have many laps). I want to find the best lap time for a User then x number of best...
In my excel file, I have a table setup with formulas. with Cells from Range("B2:B12"), Range ("D2:D12"), and etc every other row containing the answers to these formulas. for these cells (with the formula answers), I need to apply conditional formatting, but I have 7 conditions, so I've been using "select case" in VBA to change their i...
I need to copy over rows from Table B to Table A. The requirement is to only insert rows that are not already in A. My question is, which is of the the following two is more efficient: A) INSERT INTO A (x, y, z) SELECT x, y, z FROM B b WHERE b.id NOT IN (SELECT id FROM A); B) INSERT INTO A (x, y, z) SELECT b.x, b....
The title pretty much says it all. Using jQuery, I need to select all elements that do not have a background color or image defined, and apply at least a white background to it. Thanks! ...
Say I have a database table T with 4 fields, A, B, C, and D. A, B, and C are the primary key. For any combination of [A, B], there is always a row where C == spaces. There may or may not be other rows where C != spaces. I have a query that gets all rows where [A, B] == [in_a, in_b], and also where C == in_c if such a row exists, or C...
How to find a <input> whose type is text and value is "no"? ...
I can not find a good spot to call selectRowAtIndexPath:animated:scrollPosition: to INITIALLY select a row in UITableView. Table data have not been loaded when the table view controller is initialized, so I can't do selection immediate after the initialization of my UITableViewController(Over bound exception would occur otherwise). ...
how can I call jquery ajax method when I select a data in a selection then perform a SELECT query from the selected data .... then i want to show the result from the query in the #info div Can someone help me? html looks like this <form action="details.php" method="post" > <select> <option value="volvo">Volvo</option> ...
Hey! I want to update two fields of table (Store) from a select of others tables, but i don´t know how i can do it. The SQL system is in AS/400, so doesn´t have SQL Server or Oracle tricks :( Here is the SELECT, i want the price and amount of an order (article table join for select only existing articles) SELECT OrderDetails.Price, Ord...