It's done using Javascript frameworks like script.aculo.us and Rico. While you certainly can use Perl to generate code calling them on the fly, it's 80% client side (with 20% server side sending back HTML snippets in response to callbacks from the Javascript).
| [reply] |
As others have said, it's Javascript, but there are modules for working with it, either setting up the client-side scripts or processing the requests. For example, see HTML::Prototype and CGI::Ajax.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
| [reply] |
It can't be implemented in Perl (well, unless you count the IE-only, plugin dependent, rarely installed, client-side PerlScript which might have the functionality).
To handle drag and drop you need the client to support it, and that means JavaScript. The JavaScript can then send the results of the action (e.g. Foo was dropped onto Bar) back to the server in whatever format you like and the data can be processed with Perl - but that's the trivial bit of the equation.
| [reply] |
The role that perl would play in this sort of thing is minimal.
To do this you need javascript, and ajax or similar if you want to have dynamic or lazily loader content.
Here is an example of javascript for dragging components:
draggable iframes at javascripttoolbox.com | [reply] |
Hi,
I recommend you using Dojo, and there's also the Turboajax if you need more advanced things not provided directly by Dojo.
There's also the Yahoo YUI
Regards,
fmerges at irc.freenode.net
| [reply] |
Thanks,
Do you have any experience working with Dojo and Turboajax with Perl?
Especially there are CPAN modules like: HTML::Dojo or CGI::Ajax.
How is the performance?
| [reply] |
Hi,
I wouldn't use them, just go to the sites and download that stuff, and put it into the static dir if you're using some kind of MVC framework...
Yes, I'm using Dojo for some projects, need to get more into it to get the full power of it, but yes, I'm using it, and is very simple, once you have an initial idea, it's lacking a bit of docs, but the essential things are documented, and for the other, you only need to take a look at the js code ot get the idea...
Well, performance is good, I like it, and in my humble opinion, the library is better than Prototype and rico.
Regards,
fmerges at irc.freenode.net
| [reply] |