Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/12/2011, 15:42
chapu34
 
Fecha de Ingreso: mayo-2010
Mensajes: 13
Antigüedad: 14 años
Puntos: 0
Exclamación problema js con ie

hola amigos tengo el sigiente problema solo con internet explorer ya que no me ejecuta o no lee bien con el siguiente codigo de javascript, es solo ie ya que en firefox, chrome, y opera andan.




Login.js:


Código Javascript:
Ver original
  1. function login(){
  2. my_popup.alert('Identificarme');
  3. my_popup.cargando();
  4. my_popup.buttons_clean();
  5.  
  6. $.ajax({
  7.         type: 'POST',
  8.         url: '/login.php?data=login',
  9.     data: 'id=1',
  10.         success: function(h){
  11. switch(trim(h).charAt(0)){
  12. case '1':
  13.  
  14. my_popup.end_loading();
  15. my_popup.buttons_clean();
  16. my_popup.status('ok');
  17. my_popup.mensaje(trim(h).substring(3));
  18.        
  19. }}
  20.        
  21.        });
  22.  
  23.  
  24.  
  25. }
  26.  
  27.    
  28.    
  29.     //trim function 1.0
  30. function trim(myString)
  31. {
  32. return myString.replace(/^\s+/g,'').replace(/\s+$/g,'')
  33. }  
  34.        
  35.         //Presets!
  36. $(document).ready(function() {
  37. $('#muro_this_group').autoResize({
  38. onResize : function() {
  39.    
  40.       },
  41.    animateDuration : 300,
  42.    extraSpace : 1,
  43.    limit: 150,
  44. });
  45.  
  46.  
  47.  
  48. });
  49.  
  50.  
  51. (function(a){a.fn.autoResize=function(j){
  52. var b=a.extend({
  53. onResize:function(){},animate:true,animateDuration:150,animateCallback:function(){},extraSpace:20,limit:1000},j);
  54.                                      
  55. this.filter('textarea').each(function(){var c=a(this).css({resize:'none','overflow-y':'hidden'}),k=c.height(),f=(function(){var l=['height','width','lineHeight','textDecoration','letterSpacing'],h={};a.each(l,function(d,e){h[e]=c.css(e)});return c.clone().removeAttr('id').removeAttr('name').css({position:'absolute',top:0,left:-9999}).css(h).attr('tabIndex','-1').insertBefore(c)})(),i=null,g=function(){f.height(0).val(a(this).val()).scrollTop(10000);var d=Math.max(f.scrollTop(),k)+b.extraSpace,e=a(this).add(f);if(i===d){return}i=d;if(d>=b.limit){a(this).css('overflow-y','');return}b.onResize.call(this);b.animate&&c.css('display')==='block'?e.stop().animate({height:d},b.animateDuration,b.animateCallback):e.height(d)};c.unbind('.dynSiz').bind('keyup.dynSiz',g).bind('keydown.dynSiz',g).bind('change.dynSiz',g)});return this}})(jQuery);
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. // efecto zumbido! 0.1 by j0n4th4ntub3!
  63. (function($){
  64.  
  65. $.fn.zumbar = function(options){
  66. var configs = $.extend({
  67.               velocidad: 60,
  68.               cantidad: 2,
  69.               duracion: 3,
  70.  }, options);
  71.  
  72. var positionin = $(this).position();
  73. var widthel = $(this).innerWidth();
  74. var Heightel = $(this).innerHeight();
  75.  
  76. if($(this).css('position') == 'static'){
  77. $(this).css('position','absolute');
  78. $(this).wrap('<div id="buzz" style="width:'+widthel+'px; height:'+Heightel+'px;"></div>');
  79.  
  80. }
  81.  
  82.  
  83.  
  84.  
  85. for(var i=0; i < this.length; i++){
  86.  
  87.  
  88. for (c = 0; c <= configs.duracion ;c++){
  89.    
  90.     $(this[i]).animate({top: positionin.top - configs.cantidad,}, configs.velocidad)
  91.               .animate({left: positionin.left - configs.cantidad,}, configs.velocidad)
  92.               .animate({top: positionin.top + configs.cantidad,},configs.velocidad)
  93.               .animate({left: positionin.left + configs.cantidad,}, configs.velocidad)
  94.               .animate({top: positionin.top,},configs.velocidad)
  95.               .animate({left: positionin.left},configs.velocidad);
  96. }}
  97. };
  98.  
  99.  
  100. })(jQuery);
  101.  
  102. function sleep (seconds) {
  103.     var start = new Date().getTime();
  104.     while (new Date() < start + seconds*1000) {}
  105.     return 0;
  106. }
  107.  
  108. /*My popup 1.0
  109. Autor: j0n4th4ntub3*/
  110.  
  111. var my_popup = {
  112. //configuraciones...
  113. easy_close: true,
  114. close_with_btn: false,
  115. with_footer: false,
  116.  
  117. //show! mostramos el popup!
  118. show: function(){
  119. //centro el div calculando aproximadamente la pantalla.
  120.  
  121. if($('#mypopup').height() > $(window).height()-60)
  122.         $('#mypopup').css({'position':'absolute', 'top':20});
  123.     else
  124.         $('#mypopup').css('top', $(window).height()/2 - $('#mypopup').height()/2 - 200);
  125.     $('#mypopup').css('left', $(window).width()/2 - $('#mypopup').width()/2);
  126.  
  127.  
  128.  
  129. //agregemos lo elemental al popup
  130. if($('#mypopup').html() == ''){
  131. $('#mypopup').html('<div id="popup"><div id="Closepopup"></div><div class="title"></div><div id="mypopup-content"><div id="loading_popup"></div><div class="mypopup-content2" id="mensaje_mypopup"></div><div id="bottom_popup"></div><div id="footer"></div></div>');
  132. }
  133.  
  134. //easy close activado (?)
  135. if(this.easy_close){
  136.    
  137. $('#mascara').click(function(){my_popup.close(); });
  138. }
  139. //easy close no activado!
  140. else{
  141. this.close_with_btn = true;
  142. $('#mascara').unbind('click');}
  143.  
  144.  
  145. // necesitamos cerrar el popup con un boton (?)
  146. if(this.close_with_btn || this.easy_close == true){
  147. $('#Closepopup').append('<a class="close_pop" onclick="my_popup.close();"></a>');
  148. }
  149. else
  150. $('#Closepopup .close_pop').remove();
  151.  
  152. //requerimos el footer. ?
  153. if(this.with_footer){
  154. $('#footer').append('<div class="footer" id="footer_mypopup"></div>');     
  155. }
  156. //tamaño de la mascara segun la pantalla
  157.  
  158.                              
  159.            
  160. $('#mascara').css({
  161.                   'width':$(document).width(),
  162.                   'height':$(document).height() + 150,
  163.                   'display':'block'
  164.                   });
  165.  
  166. //mostramos mypopup
  167. $('#mypopup').fadeIn('fast');
  168.  
  169.  
  170.  
  171.  
  172. },
  173.  
  174.  
  175. titulo: function(title){
  176. $('#mypopup .title').html(title);
  177.    
  178. },
  179.  
  180. mensaje: function(msg){
  181. $('#mensaje_mypopup').html(msg);       
  182. },
  183.  
  184. footer: function(txt){
  185. $('#footer_mypopup').html(txt);
  186.    
  187.    
  188. },
  189.  
  190. css: function(style){
  191. $('#mypopup').addClass(style); 
  192. $('#buttons').addClass(style);     
  193. },
  194.  
  195.  
  196. center: function(){
  197.        
  198. },
  199.  
  200. status: function(stat){
  201. switch(stat){
  202. case 'ok':
  203. $('#mensaje_mypopup').css('color','green').css('font-weight','bold');
  204.  
  205. break;
  206.  
  207. case 'error':
  208. $('#mensaje_mypopup').css('color','red').css('font-weight','bold');
  209.  
  210. break;
  211.  
  212.  
  213. }
  214.    
  215. },
  216.  
  217.  
  218. close: function(){
  219. //Reset!
  220.  
  221. this.easy_close = true;
  222. this.close_with_btn = false;
  223. this.with_footer = false;
  224.  
  225. //mascara off
  226. $('#mascara').css('display','none');
  227. //mypopup off
  228. $('#mypopup').fadeOut("fast");
  229. //contenido removido!
  230. $('#mypopup #popup').fadeOut("fast",function(){ $(this).remove();});
  231.    
  232. },
  233.  
  234.  
  235. buttons: function(val,func,inthisfunc,alls,reload){
  236.  
  237. if(!inthisfunc){
  238. if(alls){
  239. $('#bottom_popup').append('<div id="buttons"></div>');
  240.    
  241. $('#buttons').append('<input type="button" class="popbuttons" value="' + val + '"' + ' onclick="' + (reload ? 'location.reload()' : func )+ '">');
  242. }
  243. else{
  244. $('#buttons').append('<input type="button" class="popbuttons" value="' + val + '"' + ' onclick="' + (reload ? 'location.reload()' : func )+ '">');
  245.  
  246. }
  247.  
  248. }
  249.  
  250.  
  251. else if(inthisfunc){
  252. $('#bottom_popup').append('<div id="buttons"><input type="button" class="popbuttons" value="' + val + '"' + ' onclick="my_popup.' + func + '"></div>');
  253. }
  254.  
  255.  
  256.  
  257. },
  258.  
  259. buttons_clean: function(){
  260. $('#buttons').html('');
  261.    
  262. },
  263.  
  264. alert: function (title,msg){
  265. this.show();
  266. this.titulo(title);
  267. this.mensaje(msg);
  268. this.buttons('Aceptar','close()');
  269.  
  270.    
  271. },
  272.  
  273. cargando: function(){
  274. $('#mypopup #loading_popup').css('display','block');},
  275.  
  276. end_loading: function(){
  277. $('#mypopup #loading_popup').css('display','none');}
  278.  
  279. }





Gracias y espero su respuesta y q me puedan dar una solucion.