TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-29-2011, 05:15 PM   #1 (permalink)
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default Ajax Drag and Drop

I'm looking to potentially implement some drag and drop functionality to my website. Property owners can add and delete images related to their villa rental property listing. They can select one image as a lead image which is the image that appears in search listings on tnhe site. I would like to use Ajax to allow ordering of the images using drag and drop and also just clicking on an image to make it th lead without having to click the form checkbox then press update.

Question i have is:

1. How difficult would this be to do? I have zero ajax experience and very limited javascript although i have written the site from scratch using php and mysql.
2.Could i use jquery to do this?
3. If i was to contract in someone to do it does this feel like a complicated piece of work or is it pretty straightforward for someone with the right skillset and if so is this a small piece of work?

Thanks,
Ewan
captainmerton is offline  
Reply With Quote
Old 01-05-2012, 10:52 PM   #2 (permalink)
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

jQuery would make that easy to do. jQuery UI actually provides sortable functionality: http://jqueryui.com/demos/sortable/

Using that sortable feature from jQuery UI you can supply a change callback that will then use $.post or some other jQuery AJAX method to submit the data to your backend.

You can use jQuery's click event to setup the ajax to save the default image.
__________________
Eric
wGEric is offline  
Reply With Quote
Old 01-08-2012, 05:26 PM   #3 (permalink)
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default

Thanks Eric.

This kind of thing is exactly what i want:

http://jqueryui.com/demos/sortable/#display-grid

How easy is jQuery to learn, understand and implement?

Cheers,
Ewan
captainmerton is offline  
Reply With Quote
Old 01-09-2012, 07:45 AM   #4 (permalink)
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default

jQuery is amazingly simple to learn and use, and once you start using it you will see so many applications for it on your sites. I've been using it for some time and still get a buzz when I do what is for jQuery a simple thing that would have normally taken 100's of lines of code to do long hand...
__________________
Thanks... Simon

Sex, Drugs & Linux Rules
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote
Old 01-12-2012, 06:10 PM   #5 (permalink)
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default

Bought this book to help me get up to speed:

http://www.amazon.co.uk/JavaScript-j.../dp/1449399029

Will let you know how i get in. Cheers.
captainmerton is offline  
Reply With Quote
Old 01-13-2012, 02:22 PM   #6 (permalink)
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default

I picked up :

http://www.amazon.co.uk/JQuery-Visua...6464480&sr=1-3

Not got the best of reviews but it is good enough for my needs which is mainly refrence..
__________________
Thanks... Simon

Sex, Drugs & Linux Rules
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 07:23 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design