http://digitalhymn.com/argilla/tipmage/
En una parte del código dice esto:
Código js:
Ver original
/** * It can be used to save the tooltip in a database with AjAX. * @param identifier An identifier (ID) that may be useful for a database * @param posx X coordinate of the tooltip rectangle after editing * @param posy Y coordinate of the tooltip rectangle after editing * @param width Width of the tooltip rectangle after editing * @param height Height of the tooltip rectangle after editing * @param text Text contained in the tooltip after editing */ 'onInsert' : function (identifier,posx,posy,width,height,text) { // do nothing - this is just a stub },
Me pueden ayudar a entender como puedo guardar en la DB la "etiqueta" (la posicion en X, la posicion en Y, etc... de la imagen,
Muchas gracias
EDITO:
COMO MAYOR REFERENCIA ECONTRE ESTO:
[hr]
Advanced operations
Tipmage provides tools to create and edit tooltips, but they would be pretty useless without a way to give them persistence (for example saving them in a database). To gain persistence we will use callback functions.
Tipmage provides 3 function stubs: onInsert, onUpdate and onDelete. These functions will be called automatically by the engine with the right parameters, which are: ID of the tooltip, horizontal and vertical position of the rectangle, width and height of the rectangle and the text attached to the tooltip.
By implementing the stubs, we can make Tipmage do what we want with our data.
Let's see an example illustrating how to implement the onInsert function. This code should go in the same place as the code showed above.
Código js:
Ver original
<script type="text/javascript"> tipmage.onInsert = function (identifier,posx,posy,width,height,text) { // do something, like an AJaX call or whatever... }; </script>
onInsert is called when a new tooltip is added, onUpdate is called when an existing tooltip is modified, onDelete is called when an existing tooltip is deleted.
__________________
Si entiendo el ingles, pero no se nada sobre como agregar a la DB con Ajax, muchas gracias.