Jquery :: Sortable List Shows Empty
Oct 8, 2011
I am using jquery ui to have two connected sortable lists. The first list is available numbers, and the second is selected numbers. Everything with the jquery is working fine. The problem i am having is when i try to get the contents of the selected numbers box, it is empty, even though the sortables are or were dragged to that list. I tried using this.
var response = $("#selected_numbers_box").val();
alert( response );
and I also tried this..
var response = $("#selected_numbers_box").html();
alert( response );
both are empty. What i am trying to do is retrieve the values of the new list "Selected numbers Box".
View 3 Replies
ADVERTISEMENT
Jul 9, 2007
My script is the same as this http://www.w3schools.com/php/php_ajax_database.asp
When the data comes back to me its using
document.getElementById("txtHint").innerHTML=xmlHttp.responseText
I get the data back fine. However inside getuser.php my data is in a sortable list. If i use this code above. My data comes back but I can no longer sort my list and move things around (I'm guessing because its returned as HTML only). Can anybody give me a solution of what i need to change so my list is also sortable again?
View 3 Replies
View Related
Dec 11, 2006
I'm using Drip 0.5 to test for a memory leak in some code. After reducing
the page down bit by bit to find the leak, I ended up with an empty page
that still leaked!
The page source is exactly this:
<html>
<head><title></title></head>
<body></body>
</html>
It doesn't leak the same amount each page load - sometimes it's 8192,
sometimes it's 16384, sometimes even reducing the memory load. But the
overall trend is an upward movement. I let it run for 10 minutes and it
leaked almost 10MB, so it's about 1MB/min.
This is not a serious leak, but it's making it harder to know if a leak is
caused by the js code or this other thing going on.
Has anyone else run into this? Any ideas what the problem is? I've shut down
all processes, removed all IE add-ons, etc, but no change.
View 1 Replies
View Related
Feb 17, 2011
i have the following code to get the change of position, I dont know how to make the list tell me the position of aspecific elementwhen i click it.
[Code]...
View 2 Replies
View Related
Jul 3, 2009
i am trying to use jquery UI sortable on my webpage to displaytoolbars. what i want is, let people sort these toolbars in the waythey like. i have named toolbars with id "1","2","3","4", and i savedsorted order to database via toArray method. i was wondering how icould display these toolbars with new order when people browser mysite next time, is there any method that supports it?
View 4 Replies
View Related
Nov 2, 2010
I'm new to this jquery and still learning, i having a question on how to make sortable list draggable? For e.g drag a list from sortable list to droppable zone and drop it, after drag or drop the list will back to sortable list.
View 2 Replies
View Related
Feb 25, 2011
I hava sortable list using jQuery UI Sortable. When the items are re-ordered the new order is written to the database. All working fine � however, if I use jquery to add a new item ....
[Code]..
View 4 Replies
View Related
Nov 14, 2008
I'm using this sortable method: [URL] Works perfect! I have one question though: When a certain action is taken by the user, I want to reset the original order of the <li>s in the list. I can't seem to figure out how to do that.
View 3 Replies
View Related
Jun 4, 2009
I have few lists with ui sortable/droppable and I want to have let say max 4 elements in one. So:
What code should be there? I've tried to change class to .disabled but it blocks moving.
$('#sortable'+new_id).sortable("cancel"); causes error. Script allows to move single elements and whole lists.
I want to be able move elements from all lists but disable drop if it's too long.
View 1 Replies
View Related
Feb 22, 2010
I am currently working within the Java framework using JSPs (and developing on NetBeans).
I am currently trying to develop a Javascript solution where I have two lists:
I am trying to create the Javascript solution where A,B,C are sortable and also 1,2,3; 4,5,6; and 7,8,9 are sortable within each list.
View 3 Replies
View Related
Jul 16, 2009
[URL] When I clone a list that is part of a Sortable, the Draggable objects are not bound to the cloned list, only the original one.
View 2 Replies
View Related
Dec 17, 2009
I have some sortable lists.
I need to be able to drag an element from on list to another but leave the original element in its list and have a copy in the new list.
I tried this;
But it treats el and elcone as the same element.
View 3 Replies
View Related
Nov 11, 2011
[URL] This site has a filter on it to sort by different industries. I see there is a lot of CSS done with it but not sure exactly how they built it
View 7 Replies
View Related
May 11, 2010
I know I've seen (free) scripts that do this, but I can't find them.
(Please see the mock up (link below) for reference.)
On the left, under the "Table of contents" there is a drop down menu.
Nice clean lines, simple. The choices will show a line under it.
"contributing artist" will give the option to sort a-z or z-a
The solution has to be compatible with the list below; it should be able to sort the entries and their thumbnails. Ajax?
[url]
This is on a linux server.
View 2 Replies
View Related
Jun 10, 2011
I have a database driven website, which shows a list of files that have been uploaded by users. I have a script called controller.php, which generates the HTML:
Code:
//excerpt
<?php foreach($uploads as $upload): ?>
<div class="upload">
<p><?php echo $upload['filename'] ?> |
<?php echo $upload['size'] ?> |
<?php echo $upload['type'] ?>
</p>
[Code]...
View 3 Replies
View Related
Sep 18, 2009
I've got an infinite jQuery carousel, which is working, however I need to make a couple of tweaks and I don't know where to start. Below is the code for a visually simplified, but technically identical version:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]">
<html xmlns="[URL]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Page Title</title>
<script src="[URL]" type="text/javascript"></script>
<script type="text/javascript">
$.fn.infiniteCarousel = function () {
function repeat(str, num) {
return new Array( num + 1 ).join( str );
} .....
Basically, I'm trying to achieve two things:
1. The script creates empty carousel items; these are visible in yellow when you scroll through the items by clicking on the blue squares. How can I remove these so that item '6' goes straight back to item '1', without the two empty list items in between?
2. At the moment two clicks allow you to see all 6 'real' squares, plus the two empty yellow ones. How can I make it so that it scrolls one list item at a time, rather than 4 at present?
View 3 Replies
View Related
Aug 3, 2010
I wrote an application using jquery/sortables and ran into a problem that I just don't understand well enough to tackle and hoping a jquery expert can see the solution where I don't.
I have a db setup like so
My page is setup to display multiple 'sortable' lists that allow the user to re-position elements (divs) with the mouse. Each div contains the 'content' (Bananas, Apples, etc) for users to see and they're even editable-in-place which all functions great.
THE PROBLEM: Each list has a class of 'biglist' in which I use the connectWith to allow these elements to be dragged from say myList3 to myList7.
Visually this looks great on the page but there's no DB functionality behind it to "SAVE" the new position. The only save that works is the elements position in its CURRENT list.
All 'content' in the fifth list for example is being generated from a SELECT statement [WHERE boxid = 5].
Each list has a different php file to generate its content that is virtuallyidentical
The order of each element is saved via a simple method in sortable's update function
Sorting is done here:
This is done roughly 10 times because there are ten lists. So here's the big question:
How can I pass the list's number (or create an ID for each list) that'll save WHICH list the items been moved to so that it's saved. (IE how can I change boxid instead of just Order)
View 1 Replies
View Related
May 26, 2010
1 - Accordion style vertical list that expands element (Film # and description) when "+more" link is clicked, and closes the previous open film and description.
2 - Activation of "+ more" shows a photo in separate div, and hides the previous photo that was visible in this separate div.
View 4 Replies
View Related
Jun 5, 2009
While using jQuery, I found that I needed to know how many records were returned and also if the result set returned was empty. After searching the jQuery documentation I couldn't find any property or method that returned this value, so I've added that functionality
myself and wanted to share it with the group.
1) Determine the number of records returned: I wanted to show the user how many results were returned after they start typing into the autocomplete field similar to how Google indicates the number of results found when you start typing in the search box. At first I thought the max parameter in the function formatItem returned this value. However, it returns the max option that you set it to. So if your query returns 100 records and you set max to 25, it'll obviously return 25 (not what I wanted).So after trying various things, I looked at the jQuery code and simply added the number of records returned by the database to the formateItem function. In the fillList() function around line 660 I added the data.length parameter:
var formatted = options.formatItem(data[i].data, i+1, max, data [i].value, term, data.length);And in my autocomplete code, I added the parameter to the end of theparam list:formatItem: function(data, i, total, value, searchTerm, totalResults)So now whenever a new search is preformed, I get back the number ofsearch result from the database.
2) Determine if a result set returned was empty I wanted to update a <div> with a message like "no records found" whenever the query yielded no results. Again, after searching the jQuery documentation, I couldn't find any property or method that would indicate this so I added it to the code. In the request function after the line var data = cache.load(term); I added the following:
if (!data) {
options.isEmpty(0);
} else {
[code]....
View 5 Replies
View Related
Oct 25, 2011
I am asking jQuery to tell me which drop down option is selected in a drop down list - like this:
I would like to check if this was successful before I proceed. What are the possible return values for this statement?
If no id exists.
If no option is selected.
If some other problem occurred.
In these cases am I expecting a null return; an undefined return, a false return value?
And, based upon the complete set of return possibilities, what would be the best and most comprehensive tests I could apply to cover every base.
View 4 Replies
View Related
Mar 27, 2009
I have an AJAX script which is used for a "live search" type function.When a user begins to type their search, after 3 characters, my AJAX script jumps into action and shows them a list of possible results.I has worked fine for months, and now suddenly I have found that it is causing a javascript error.I have traced the error down to the "open" call... ie: this.xmlHttp.open("GET", url, true);Like I said, this has worked for ages and I haven't changed these files since I got them working.
View 1 Replies
View Related
Jan 13, 2011
i am new to Html and i am helping run a website for virtual golf. we were thinking of adding a Statistics page but would need the table used to be sortable so by hitting the header the column sorts the figures in order, the tablw would only be 50 rows and 8 columns. i have looked at the website [URL]../docs/but cant seem to sort out where to place things. a step by step guide would very much be appriciated.
View 6 Replies
View Related
Oct 21, 2011
Anyone had any luck getting sortable working correctly in IE9?
[URL]
I don't see anything in the bug tracker regarding this, anyone else experience this? Anyone have 5 seconds to fire up IE9 and try the above demo?
View 5 Replies
View Related
Mar 3, 2011
How to add a draggable to sortable programatically ?
<script>
$(function() {
$( "#sortable" ).sortable({
revert: true
});
});
[Code]....
In the above code i have a list of sortables, i want to add the draggable($obj) to a sortable, even though i add to the sortable in the add method, that gets added but does not play as a draggable,Do i need to call any method of sortable after adding the draggable ?
View 3 Replies
View Related
Aug 3, 2009
have such a structure in HTML which finally looks like shown on this
[Code]...
View 5 Replies
View Related
May 14, 2009
its an accordion like tool. It functions just how Ineed it, except id love to make it sortable.with the codeupdate?jQuery :
$(function() {
$("#accordion1").addClass("ui-accordion ui-widget ui-helper-reset")
.find("h3")
[code]....
View 1 Replies
View Related