I have this jQuery snippet:
$(function() {
$("ul > li").hover(function() {
$(this).find("ul").stop(true, true).animate({opacity: 'toggle'}, 'fast');
});
});
This opens every <ul> what's inside in another <ul>, but I want to make this only for
:
<div id="header"></div>
EDIT
Here is the structure, I modi...
I have two select queries:
SELECT MONTH(date) AS month, count(DISTINCT ip)
FROM table_name WHERE field = 1 GROUP BY month
and
SELECT MONTH(date) AS month, count(DISTINCT ip)
FROM table_name WHERE field = 2 GROUP BY month
how can I write one query to select
SELECT MONTH(date) AS month,
count(DISTINCT ip) [ for field = 1],...
Hello,
I want to be able to detect when the user has selected an option from a SELECT element in a form. I know what to do from there, but not sure about how to achieve the initial detection.
<select id="mySelect">
<option>1</option>
<option>2</option>
<option>3</option>
</select>
I would like the solution in JQuery if po...
Three things: select box 1, input box, select box 2.
Based on the selections in select box 1 (drop down list 1), I want either input box to be visible or select box 2 to be visible, but not both.
Any help would be great :) I am populating the options in select box 2 based on the choice in select box 1, but sometimes the user's choice ...
The normal way to do this would be:
var resultSelect = document.getElementById("resultSelect");
resultSelect.size = 3;
How do i do this in jQuery?
Thanks in advance
...
I have a table A with this column:
IDS(VARCHAR)
1|56|23
I need to run this query:
select TEST from TEXTS where ID in ( select IDS from A where A.ID = xxx )
TEXTS.ID is an INTEGER. How can I split the string A.IDS into several ints for the join?
Must work on MySQL and Oracle. SQL99 preferred.
...
i need to select change some data and change image in own form
each from will have own preview image.
each image will get attr name "imagePreview" from selected the option.
if nothing in attr or imagePreview="0" will do nothing
here some of my working scrip but when I change option all image preview in DIV tag will change not just in th...
I need to select a row from table that has more than 5 millions of rows. It is table of all IP ranges. Every row has columns upperbound and lowerbound. All are bigintegers, and the number is integer representation of IP address.
The select is:
select *
from iptocity
where lowerbound < 3529167967
and upperbound >= 3529167967
...
I wrote some jQuery code to .hide() an <option> element in a select dropdown. .hide() is what I want, because later I can call .show() and the options will not need to be resorted, since the now visible option element will not have changed positions.
.hide() worked great in FF/Chrome, but not in IE6/7/8. So my thought was to write mor...
I am making a simple select from mySQL using PHP. I am doing something wrong that I can't seem to track down.
Here's my statement:
$storyTitle = $_GET['title'];
$storyDate = urldecode($_GET['date']);
$SQL = "SELECT
*
FROM
tblContent
WHERE
REPLACE(contentTitle,' ' , '-') = :storyTitle
AND
date...
hi, i have a plain dropdown list (html ) that looks pretty simple. It is a list of countries and i need to add the flag inside the select . Is there a nice jquery replacement out there?
Something like http://www.oanda.com/currency/converter/ could work (check out the currency list).
Thanks.
...
Here is the markup
<select id="person_prefix" name="prefix">
<option value=""></option>
<option value="Dr" selected="selected">Dr</option>
<option value="Mr">Mr</option>
<option value="Ms">Ms</option>
<option value="Mrs">Mrs</option>
</select>
and I want to trigger a javascript event so that the option list drops down. Using jqu...
I'm trying to create a basic search functionality for MySQL InnoDB. I know there is Full-text search, but I just want to make an easy and simple solution for now. What I want is that when a user search for example "BMW Car" I want to find results not just like "BMW Car" but also "Car BMW" "BMW Z4 Car" and so on.. Is there an easy way to ...
I'm trying to count how many created vs published posts there are per user in my database.
POST ID | USER ID | STATUS
...and an example would be
User ID 1 has 5 posts (5 distinct post IDs) with 3 STATUS = CREATED and 2 STATUS = PUBLISHED. I want the output to show the following columns
USER CREATED PUBLISHED
---------------...
I have two selects in my Spring form. The other contains all the possible values for user to select, and the other should show that the user has picked. Idea is, that the value moves from select box to another when clicking a button. I assume this can be done with Javascript, but is there any example how to get it work with Spring 3? The...
I have a mysql problem. I have two tables like this that I need to join together.
table:
id otherid2
1 | 1
2 | 1
3 | 2
4 | 2
table2:
otherid otherid2
1 | 1
2 | 1
3 | 2
4 | 2
I'm using:
SELECT id,otherid FROM table INNER JOIN table2 ON table.otherid2=table2.otherid2
Th...
I want to select a value in a select/option dropdown using javascript only.
Revised
sorry for confusion. Here is revised code.
document.getElementById("sel_activity").value = activity;
This will also work, but is a bit longer..
<select id='sel_activity'>
<option value='CYC'>Cycle Count</option>
<option value='INV'>Inventory Count</o...
Is this most efficient way of setting a select/option box with javascript?
<select id='sel_activity'>
<option value='CYC'>Cycle Count</option>
<option value='INV'>Inventory Count</option>
<option value='INVDROP'>Inventory Drop off</option>
<option value='INVPICK'>Inventory Pick up</option>
<option value='TRAIN'>Training</option>
</selec...
I inserted InkCanvas in my WPF Window. When I start to erase with eraser on my pen, inkCanvas automatically changes editing mode to EraseByStroke. But when I use select with pen (button on the side) he can not figure that out and remains on Ink mode. Can I do this by my self (switching mode between Ink and Select) with some Event or some...
Hi, all! I have Postgresql and query
SELECT
complex_expression()
FROM
t
WHERE
complex_expression() != '';
Is there a way to write complex_expression() only once in query and then refer to it? Thanx in advance
...