JQuery :: Ui-sortable And Connect - Pass A "list ID" With The Update?
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
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
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
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
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
Aug 16, 2010
i am writing a script that will update a dropdown list based on the selection of a previous list. the script is run by a PHP script, so instead of posting the PHP, i will post an example client-side script. the hierachy is: category, sub category, brand (but sometimes there exists no sub category and the PHP script queries and adds brands instead) everything works correctly, except for one major issue: you can not change the selection of the third (brand) box this could be an easy fix for some coders, but i am not experienced in javascript and could really use some help. here is an example script, sorry it is so long
[Code]...
View 4 Replies
View Related
Nov 4, 2010
ery new to Jquery but really like what I'm seeing. Really improves the interface. Is this possible to achieve? Partial Page Update Without Having To Do An ASP Auto Post Back on a ASP control. I have <div id="documents"> An <asp:RadioButtonList id="selector" Class="tablecell"> When its checked, can I refresh the documents div only rather than the full page?
View 1 Replies
View Related
Mar 10, 2010
Trying to construct a sql statement to update field values contained in a form. I would like to only update the values that are changed. If the current $_POST[] values populated in the form are not changed, there is no need to add that field to the UPDATE statement... but i am not sure how to do this with javascript and pass only those values. Can someone help?
Some say that it is not worth the code processing to do this but I would like to do this if possible. I know that phpmyadmin works this way.
View 2 Replies
View Related
Feb 23, 2011
I can have a unlimited set of list items and form fields (limited) in li:
<li id="apr1">
<textarea class="thisistext">blablabla
View 4 Replies
View Related
May 16, 2007
I have a page with 2 forms on, namely form1 and form2!!
In form1 there is a listbox with a drop down of IDs. Now if the user selects a different ID in that list, form2 hidden variable (qualstatus) needs to be updated with the new ID which was selected in form1. I have tried the following.
function changequal() {
document.form2.qualstatus.value = document.form1.qualstatus.value
}
with a
<select name="qualstatus" id="qualstatus" onChange="changequal()">
however this does not seem to update the value of
<input name="qualstatus" type="hidden" id="qualstatus" value="<%=(rsAction.Fields.Item("qualStatusID").Value)%>">
View 5 Replies
View Related
Jan 6, 2010
I would like to Update a Sharepoint List (Document Library) Folders using Web Services with Javascript.
I have searched on Goggle but nothing that updates a document Library using UpdateListsItem method & with it being a clientside i need to pass NT Credentials to the List
View 1 Replies
View Related
Oct 1, 2009
I have a dynamic table where I would like to update cells by using a drop list selecting from half a dozen items. I have searched W3Schools for a tutorial but I am obviously looking in the wrong place. The working code I have thus far is:-
function insRow()
{
var x=document.getElementById('myTable').insertRow(1);
var a=x.insertCell(0);
var b=x.insertCell(1);
var c=x.insertCell(2);
var d=x.insertCell(3);
var e=x.insertCell(4);
var f=x.insertCell(5);
[Code]...
View 2 Replies
View Related
Jul 23, 2005
I am trying to create a web page in which the contents of one selection list
depends upon which element in another selection list is chosen, but where
the information to populate the first selection list comves from an SQL
database on the web server.
There are a couple of these situations in my application but, for example,
the first list might be a list of counties, and the second list a list of
states/provinces. Obviously the names of counties depend upon which
state/province is chosen, but there are too many possibilities to be able to
embed them within the web page itself. So when the user selects a
state/province I need to go to the server to ask for the list of counties.
I have seen a number of posts that sort of address this issue. For example
it is suggested to use <script src="a URL"/> to ask the server side code to
send up data of type "text/javascript". However the examples do not seem to
address how the server side code would know which state/province the user
had selected.
If there is a web site that addresses this sort of thing, I would appreciate
any pointers.
View 5 Replies
View Related
Apr 14, 2011
I don't understand what should I do on the step 3 from Usage where it says
Connect the image cube functionality to your divisions
$(selector).imagecube();
View 4 Replies
View Related
Jan 28, 2010
I have set up a reverse proxy for a wordpress blog that is using the theme mystique. When I use IE to connect directly to the blog the theme works fine and loads ie7.css When I connect through the reverse proxy to the blog the theme does not load the ie7.css
From what I can work out it looks like the person who wrote it is using jquery to determine the browser type. Any ideas why jquery would fail when passed through a reverse proxy?
View 2 Replies
View Related
Mar 16, 2010
I am a PHP programmer and new to Javascript and jQuery and I have tried about 20 examples/tutorials and cannot seem to get even close to what I want.I have a form (PHP/MySQL) with a list of subjects I got from my database, and then create a set of radio buttons from that list. And based on what radio button they select, I need to pass that variable to a div (at least that's what I want to use) and then show a list of videos that match the radio buttons value. I don't care if its a get or post or other.I tried to use GET or POST so I can use that value for my PHP/MySQL lists.I am open to any suggestions/tutorials, etc.
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