Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/05/2011, 07:15
Avatar de PabloPF
PabloPF
 
Fecha de Ingreso: mayo-2011
Ubicación: Ciudadano de un lugar llamado mundo!
Mensajes: 137
Antigüedad: 13 años
Puntos: 5
Respuesta: como usar jcrop?

si y tengo todos los scripts.
el codigo html es este:
Código HTML:
Ver original
  1.  
  2.         <script src="../js/jquery.min.js"></script>
  3.         <script src="../js/jquery.Jcrop.js"></script>
  4.         <link rel="stylesheet" href="../css/jquery.Jcrop.css" type="text/css" />
  5.         <link rel="stylesheet" href="demo_files/demos.css" type="text/css" />
  6.         <style type="text/css">
  7.             fieldset.optdual { width: 500px; }
  8.             .optdual { position: relative; }
  9.             .optdual .offset { position: absolute; left: 18em; }
  10.             .optlist label { width: 16em; display: block; }
  11.             #dl_links { margin-top: .5em; }
  12.         </style>
  13. <script language="Javascript">
  14.  
  15. $(function(){  
  16.  
  17.     $('#cropbox').Jcrop({  
  18.         aspectRatio: 1,  
  19.         onSelect: updateCoords  
  20.     });  
  21.  
  22. });  
  23.  
  24. function updateCoords(c)  
  25. {  
  26.     $('#x').val(c.x);  
  27.     $('#y').val(c.y);  
  28.     $('#w').val(c.w);  
  29.     $('#h').val(c.h);  
  30. };  
  31.  
  32. function validar()  
  33. {  
  34.     if (parseInt($('#x').val())) return true;  
  35.     alert('Seleccionar una region');  
  36.     return false;  
  37. };  
  38.  
  39. </head>
  40.  
  41. <img src="demo_files/flowers.jpg" id="cropbox" />  
  42. <form action="" method="post" onSubmit="return validar();">  
  43.     <input type="hidden" id="x" name="x" />  
  44.     <input type="hidden" id="y" name="y" />  
  45.     <input type="hidden" id="w" name="w" />  
  46.     <input type="hidden" id="h" name="h" />  
  47.     <input type="submit" value="Crop Image" />  
  48. </form>  
  49.  
  50. </body>
__________________
no hay justicia si la guerra esta justificada