JQuery :: PHP/MySQL - Reorder List, Save Results?
Apr 5, 2011
This is a combination of jQuery and a PHP problem so I'm not 100% certain where to post it. I am working on method to reoder a list that comes from a database. When the lists is displayed, it will be ordered by a "sort" column. The user can drag/drop the list to change the order, and I want the order to update the sort values in the database.I found a script that provides a decent starting point, but I am not getting the results I want.
1: It is able to reorder the columns, and save the results which is good.
2: It is saving the results as "0,1,2,3" rather than reordering the numbers from the "sort" column. (< this is what I need fixed)
EG: Name > Sort
Apple3
Orange 5
Pear 13
Kiwi 105
If I reorder these in the reverse order using the script, I end up with the following in the database.
Apple 3
Orange 2
Pear 1
Kiwi 0
Yet what I want is,
Apple 105
Orange 13
Pear 5
Kiwi 3
how I can get it to work with the existing "sort" values, rather than serializing and starting at 0. Here are the script files I am currently working with for testing.
DATABASE
Code:
CREATE TABLE `menu` (
`id` int(11) NOT NULL auto_increment,[code]....
View 1 Replies
ADVERTISEMENT
Aug 2, 2011
I have a table that has parts with multiple characteristics. Part Number, Height, Width, Capacity, Price, Etc. I would like to have a drop downs for all of these values, when a user selects one of these values it will filter the results into a list. Ex. user selects a part that has a Height of 6 and width of 10 it will only list those parts. As I said earlier, I have a script that will give me all the parts, however I am not able to make the onchange list parts with multiple values.
View 9 Replies
View Related
Jan 12, 2010
I know that there are some really nice jQuery UI. However, I'm really new to jQuery and I need to save the order into a SQL Server database so that next time if the same user comes back to the site, the picture will be in the same order that he/she reordered it previously.
View 1 Replies
View Related
Jun 15, 2010
I am a novice with JavaScript, and I was wondering how I would reorder a list of data. I googled this and found some ways but none of them really applied to me.
I have a database with names of courses (its for a restaurant), they all have an ID which ranges from 1-8 (I only have 8 courses so far). I can add and delete courses from this table but I would like to be able to reorder theses courses, in other words change their ID, without having to go into the database and manually change itself.
View 6 Replies
View Related
Jun 15, 2010
how I would reorder a list of data. I googled this and found some ways but none of them really applied to me. I have a database with names of courses (its for a restaurant), they all have an ID which ranges from 1-8 (I only have 8 courses so far). I can add and delete courses from this table but I would like to be able to reorder theses courses, in other words change their ID, without having to go into the database and manually change itself.
View 6 Replies
View Related
Sep 6, 2009
I have a list where I want to reorder the list on each user click. for example,
<ul>
<li name="li_one"><a href="one.html">one </a></li>
<li name="li_two"><a href="two.html">two</a></li>
<li name="li_three"><a href="three.html">three</a></li>
</ul>
If the user selects "two", then the list order should be sorted as follows
[Code]...
the selected item should always appear first in the list. Is it possible to do with javascript?.
View 4 Replies
View Related
Feb 17, 2011
I want to do is let the user input a file,then read the contents send it to the server, loop over the inputs to query MySQL, return the results and display it in a user friendly,scrollable table?
View 1 Replies
View Related
May 23, 2007
I am trying to save a div where I have inserted an image with insertimage() to a mysql databe, everytime it garbles my table for some reason, a div with text only works like a charm. I use serialize/deserialize.
View 1 Replies
View Related
May 18, 2011
i have the code used to generate additional dynamic fields how can i save data entered in mysql???
View 1 Replies
View Related
Jun 20, 2011
i have a a script for typing speed test. after 10 sex. script shows some result like Raw CPM: 35 Corrected CPM: 20 WPM: 4Time left: 0 Your score: 20 CPM (that is 4 WPM) In reality, you typed 35 CPM, but you made 3 mistakes (out of 7 words), which were not counted in the corrected CPM score.
[Code]..
View 2 Replies
View Related
Jun 22, 2011
This form retrieves results from a mysql database. It works fine but when I click submit it shows the result only for a second. When I hold down submit the result stays there. How do I get the result to stay on the screen after I hit submit? Even better how do I get it to spit out results without having to hit a submit button or press enter?
View 15 Replies
View Related
Feb 12, 2010
I have a listings page which displays results using images and text which are stored in a MySQL database, all is working fine. The images are pulled into the page from the database and each listing can have up to a maximum of 10 images. Some will have all 10, some probably one or two, so the page is coded such that if there's an image in the field, it displays a thumbnail, if there isn't then it shoves a " " in instead.
The results page has one main photo (image 1) and then a series of thumbnails (images 2-10) below it and I need to be able to set this up so that when someone clicks on image 2 it shows the full-size version of that image in the div where image1 sits, and the same for however many remaining images there are.
So my question is, how easy it is to do this with javascript and does anyone have any idea how to code it?
The main photo sits in a div whose id is "mainphoto" the remainder all sit in a div whose id is "thumbpix".
View 1 Replies
View Related
May 5, 2010
I have these two MySQL tables (location, properties). Each location can have one or more properties so both tables are related using Keys. What I'm trying to implement is an HTML form where when a user selects a location then the system automatically filters the properties results accordingly. The "location" list is loaded from MySQL using PHP, but obviously PHP doesn't allow me to filter the "properties" list while the selection is at the user side.
View 2 Replies
View Related
Aug 17, 2011
I am using custom save button for a list 'MyList'. i am able to save all the fields. i am using these [code]...
But the problem is, i am not able to save the the 'Attach File'
since i have not written the code for that. Please some1 guide me with the file attachment save code.
View 3 Replies
View Related
Apr 18, 2011
i have a problem with the jquery autocomplete on IE.When i use the page scrollbar the results list disappers.maybe it's a problem on focus.
View 2 Replies
View Related
Mar 7, 2010
I wish to have a user list updated every 20 seconds or so with the users that are still online.
I have the time(); stored in the database with their usernames, how do i get this uaing JavaScript.
View 6 Replies
View Related
Sep 23, 2010
I want to make search box like google. when typing in the text box it will show search list. the list must be from mysql query search. How can I do that.
View 1 Replies
View Related
Apr 21, 2006
Considering the following list how do I get a reference to the ul just below
the li with id products? nextSibling gives me a reference to the #text# node
inside the li tag?
<ul>
<li id="products">products</li>
<ul>
<li id="child">child</li>
<li id="chair">chair</li>
</ul>
</ul>
I want to create several functions to add or remove items from the list.
View 6 Replies
View Related
Nov 24, 2010
Is there a best way to reorder a jquery group/array, eg bring one item to the first position? Should you do it with a normal array.sort() or splice(), or is it possible with an internal function map()?
View 2 Replies
View Related
Sep 30, 2009
I have an html file with 1000 exam questions in this format code...
table 1 is stacked on top of table 2, which is stacked on table 3.
each of the 1000 questions is formatted like this.
I want to reorder it to this for all 1000 questions code...
View 5 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 26, 2011
Can I make a list of hyperlinks that users can customize and save as a cookie by clicking a button and automatically retrieve the cookie so it remembers their list next time? This is kind of what I want to do:
[Code]...
View 1 Replies
View Related
Jul 20, 2005
In my site I show low quality pictures. When someone right clicks an
image and selects 'Save Picture As...', I wish to let him save the
high quality picture.
View 5 Replies
View Related
Jun 29, 2000
When you right click on a link you get the option to save target as...(ie) and save link as...(netscape). Is there some JavaScript to call this function like the JavaScript to open a new window?
View 3 Replies
View Related
Jul 13, 2011
I am having no luck with my post form to mysql. It is only posting the first letter of the word/phrase for the text input fields to the mysql database. It is a photo and text post form. The photo and only first letter of text are posting to database. I am using Jqtouch, jquery, and phonegap.
Here is my form fields:
Here is my java script:
View 3 Replies
View Related
Dec 6, 2010
Code: //Define the class
class author{
function author(a:String,b:String,c:int)
{
this.name = a;
this.lastname = b;
this.age = c;
}
[Code]...
in this code the variable "newBook" to save the whole object, returns to save only the last one that was created...
View 1 Replies
View Related