Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/04/2011, 12:09
Avatar de neodani
neodani
 
Fecha de Ingreso: marzo-2007
Mensajes: 1.811
Antigüedad: 17 años, 2 meses
Puntos: 20
Ejecutar dos javascript al pulsar un enlace

Buenas,

Alguien sabe donde está el error? intento que se ejecuten estos dos javascript primero uno y luego otro.


<a href="javascript:$('#file_upload').uploadifyUpload (); && javascript:mostrardiv('new_avatar');">Subir Avatar</a>
<div id="new_avatar" style="display:none;">
<p>EL NUEVO AVATAR</p>
</div>


Código Javascript:
Ver original
  1. <script type="text/javascript">
  2.       $(document).ready(function() {
  3.         $('#file_upload').uploadify({
  4.           'uploader'  : '/js/upload_files/uploadify.swf',
  5.           'script'    : '/libs/config_cuenta/uploadify.php',
  6.           'cancelImg' : '/libs/config_cuenta/cancel.png',
  7.           'auto'      : false,
  8.           'buttonText'  : 'Examinar',
  9.           'fileExt'     : '*.jpg;*.gif;*.png',
  10.           'fileDesc'    : 'Web Image Files (.JPG, .GIF, .PNG)',
  11.           'sizeLimit'   : 102000,
  12.           'onAllComplete' : function(event,data) {
  13.                             mostrardiv(new_avatar);
  14.                             }
  15.         });
  16.        
  17.       });
  18.  
  19.     function mostrardiv() {
  20.         div = document.getElementById('new_avatar');
  21.         div.style.display ='';
  22.     }
  23.    
  24.       </script>

Muchas gracias de antemano