Ver Mensaje Individual
  #6 (permalink)  
Antiguo 01/12/2009, 11:28
arielgon
 
Fecha de Ingreso: junio-2009
Mensajes: 31
Antigüedad: 14 años, 11 meses
Puntos: 0
Respuesta: Como combinar esto

Cita:
Iniciado por crujikoki Ver Mensaje
Hola,

Me imagino que lo que te pasa es que le estás diciendo que para un mismo evento te haga 3 cosas distintas y supongo que le navegador estará flipando.

Me puedes poner el HTML? Lo digo por que así si te lo hago en el tuyo mismo te irá mejor para que veas que he hecho (a parte de que tampoco voy muy sobrado de tiempo ahora mismo :P).

Saludos.
Hola, disculpa la demora pero no estube por aqui, ahi va html

html>
<head>

<script src="recorte/jquery.min.js"></script>
<script src="recorte/jquery.Jcrop.js"></script>
<link rel="stylesheet" href="recorte/jquery.Jcrop.css" type="text/css" />
<link rel="stylesheet" href="recorte/demos.css" type="text/css" />
<link rel="stylesheet" href="style/design.css" type="text/css" />
<link rel="stylesheet" href="styles/uno.css" type="text/css" media="screen" />
<script language="Javascript">

$(function(){

$('#cropbox').Jcrop({
aspectRatio: 1,
onSelect: updateCoords
});

});

function updateCoords(c)
{
$('#x').val(c.x);
$('#y').val(c.y);
$('#w').val(c.w);
$('#h').val(c.h);
};

function checkCoords()
{
if (parseInt($('#w').val())) return true;
alert('Please select a crop region then press submit.');
return false;
};

</script>

</head>

<body>
<div id="container">
<div id="header">

<!-- end #header --></div>
<?php
if($ariel==0){
?>
<div class="article" align="center">
<h1></h1><p>
<table>
<tr>
<td>
<!-- This is the image we're attaching Jcrop to -->
<img src="albunes/<?=$line["user"]?>/<?="sml_".$line["imagen"]?>" id="cropbox" />
</td>
<td>
<div style="width:100px;height:100px;overflow:hidden;">
<img src="albunes/<?=$line["user"]?>/<?="sml_".$line["imagen"]?>" id="preview"/>
</div>

</td>
</tr> </table>

<!-- This is the form that our event handler fills -->
<form action="" method="post" onsubmit="return checkCoords();">
<input type="hidden" id="x" name="x" />
<input type="hidden" id="y" name="y" />
<input type="hidden" id="w" name="w" />
<input type="hidden" id="h" name="h" />
<input type="submit" value="Cambiar" /> <a href="perfiles.home.php?id=<?=$id?>">Volver</a>
</form>
</div>
<?}else{?>
<div class="article" align="center">
<img src="albunes/<?=$line["user"]?>/sml_<?=$imagen?>"/><br>
<b>La foto de tu perfil fue editada <a href="perfiles.home.php?id=<?=$id?>">Volver a mi Perfil</a></b>
</div>
<?};?>
</div>
</body>

</html>