RE: NetFlix Drag and Drop Row Ordering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here is the code we used at the time:

http://dhtmlkitchen.com/scripts/draglib/index.jsp

I modified it a bit to meet our needs, if you're doing an open-source
project it's free to use.  In my experience if you take your time
JavaScript can be made to work in any browser.  

We actually don't use the code anymore, the needs of the application
changed, so we went from the drag and drop ordering to a sorting method
using arrows to indicate up and down.  It is still driven by JavaScript.

I never read any books on JavaScript, it's similar syntactically to PHP
or any language like that, the big thing is to learn the JavaScript DOM.
I just found some good reference pages and learned from there.  I have
the most useful ones memorized, anything else I'll Google for it.  If
you can code in PHP JavaScript will be a piece of cake.

The advantage of JavaScript over PHP is that it's client side.  This
means you don't have to do a page reload for each action a user takes.
You can sort tracks in your application with PHP but each time a user
selects an item to move up you have to submit the page, then re-present
the page.  With JavaScript the user can reorder all they want, then
submit the page once.  I then take the list of items in the new order
and submit them to the DB. 

Best of luck...

Nate Tobik
(412)661-5700 x206
VigilantMinds

-----Original Message-----
From: Graham Anderson [mailto:grahama@xxxxxxxx] 
Sent: Thursday, March 24, 2005 2:29 PM
To: php-general@xxxxxxxxxxxxx; Nathan Tobik
Subject: Re:  NetFlix Drag and Drop Row Ordering 

thanks for the tip

I am pretty unfamilar with javascript..
But for my purposes, I guess I better learn it
I am fairly conversant in a couple of languages so hopefully it won't 
be too bad
recommend a good book ?


Essentially, I want CMS users to be order their own playlist of 
multimedia tracks.
Is there any reason not to take a javascript approach ?
because this would be for a CMS only  the javascript does not have to 
work for EVERY browser....

Out of curiosity, are you still using this approach? Or, was it too 
problematic ?
g

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux