Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/01/2010, 10:48
Avatar de skatomundo
skatomundo
 
Fecha de Ingreso: junio-2002
Ubicación: Santiago - CL
Mensajes: 2.532
Antigüedad: 24 años, 3 meses
Puntos: 125
Respuesta: Mandar variables de Javascript a PHP

La función:
Código PHP:
function saveCoords (coords, dimensions)
{
    $( 
'x1' ).value = coords.x1;
    $( 
'y1' ).value = coords.y1;
    $( 
'width' ).value = dimensions.width;
    $( 
'height' ).value = dimensions.height;
} 
almacena en "input hidden" los valores, luego desde PHP deberás recoger los datos con "$_POST"

Código PHP:
$x1      = $_POST['x1'];
$y1      = $_POST['y1'];
$width   = $_POST['width'];
$height  = $_POST['height'];