views:

59

answers:

1

I've made a pure PHP script that uses GD library to put text on an image, text entered from a HTML form. The problem is that i can't give the user the possibility to position the text properly.

I've found this good example http://lolkot.ru/lolmixer/#1369, it allows users to play with the text very easily with the mouse !

How is this possible ? What technologies are used for this ?

+2  A: 

JavaScript yui (for drag and drop of the texts), jQuery (for events and AJAX), server side generation of transparent png-s (containing texts)

Kamil Szot
You can also use most any JavaScript library that supports draggable elements. jQuery, Scriptaculous, etc
Marco Ceppi
Or you can write your own drag Javascript code...
deceze
... if you're insane. [Someone else already did the hard work](http://jqueryui.com/demos/draggable/), after all.
Charles
Sure, I just wanted to highlight that you don't need a library to do this, as everybody is too quick to recommend jQuery et al. And it's really not all that complicated if you know what you're doing. :)
deceze
I think recommending jQuery is never too quick. I think that jQuery is the best thing that happened to JavaScript ever. Every time when I write some jQuery code I am amazed how easy this is and thankful of how much of my work is saved.
Kamil Szot