2010-04-02 1 views
1

Je reçois ce,les dialogues d'erreur de débogage de script d'arrêt se produisent dans ie8?

alt text http://www.freeimagehosting.net/uploads/fd8d2e9f00.jpg

cliquant sur 'non' signifie que la page affiche parfaitement.

il est cette partie se référant à des jquery1.4.2.js:

// Get the Nth element in the matched element set OR 
// Get the whole matched element set as a clean array 
get: function(num) { 
    return num == null ? 

     // Return a 'clean' array 
     this.toArray() : 

     // Return just the object 
     (num < 0 ? this.slice(num)[ 0 ] : this[ num ]); 
}, 

Je suppose que j'appelle quelque chose dans le mauvais contexte quelque part dans un de mes fichiers js (ce qui serait une véritable mission trouver).

Est-ce que les utilisateurs IE8 standard auront cette erreur?

(j'imagine ms rendent assez difficile à réinstaller-à-dire!)

mon javascript:

var IE = /*@[email protected]*/false; 

//DOCUMENT.READY EVENTS 
//--------------------------------------------------------------------------- 
$(window).ready(function(){   
    // mark events as not loaded 
    $('.event').data({ 
     t1_loaded: false, 
     t2_loaded: false, 
     t3_loaded: false, 
     art_req: false 
    }); 

    //mark no events have been clicked 
    $('#wrap_right').data('first_click_made', false); 

    //TAB CLICK -> AJAX LOAD TAB 
    $('#wrap_right .rs_tabs li').live('click', function(){ 
     var id = $('#wrap_right').data('curr_event'); 
     var tab = parseInt($(this).attr('rel')); 
     do_tab(id, tab);   
    }) 

    // cal-block event click 
    $('#cal_blocks div.event, #main_search div.event').live('click', function(){ 
     var id = $(this).attr('id').split('e')[1]; 
     window.location.hash = id; 
    }); 

    // jq history 
    $.historyInit(function(hash){ 
     if(hash){event_load(hash);} 
    }); 

    // search 
    $('#search_input').typeWatch 
     ({ 
      callback: function(){ 
       var q = $('#search_input').attr('value'); 
       search(q); 
      }, 
      wait : 350, 
      highlight : false, 
      captureLength : 2 
     });  

    $('#search_input, #main_search div.close').live('click',function(){ 
     $(this).attr("value",""); 
     reset_srch_res(); 
    }); 

    $('#main_search').easydrag();  
    $('a.dialog').colorbox(); 

    //artist names in event desc -> scroll 
    $('#wrap_right .art_link').live('click', function(){      
     var art_id = $(this).attr('rel'); 
     var id = $('#wrap_right').data('curr_event'); 
     $('#e'+id).data('art_req', art_id); 
     $('#rs_'+id+' .t2').click();   
    }); 


}); 


// FUNCTIONS 
//--------------------------------------------------------------------------- 

    function event_load(id){ 
     console.log('function called: event_load'); 
     //mark current event  
     $('#wrap_right').data('curr_event', id); 

     //hide any other events 
     if($('#wrap_right').data('first_click_made') === true) 
      { 
       $('#wrap_right .event_rs').hide(); 
      } 


     //frame loaded before? 
     var loaded = $('#e'+id).data('t1_loaded'); 
     if(loaded === true) { 
      $('#rs_'+id).show();   
     } 
     else { 
      create_frame(id); 
     } 

     //open/load the first tab 
     $('#rs_'+id+' .t1').click(); 
     $('#cal_blocks').scrollTo('#e'+id, 1000, {offset: {top:-220, left:0}}); 
    } 

    function create_frame(id){ 
     console.log('function called: create_frame'); 
     var art = ents[id].art; 
     var ven = ents[id].ven; 
     var type = ents[id].gig_club; 
     var nn = ents[id].nn; 
     var ven_add = ents[id].venue; 

     //select colours for tabs 
     if(type == 1){ var label = 'gig';} 
     else if(type == 2){ var label = 'club';} 
     else if(type == 0){ var label = 'other';} 

     //create rs container for this event 
     var frame =    '<div id="rs_'+id+'" class="event_rs">'; 
     frame +=    '<div class="title_strip">'; 
     frame +=    '<p class="rs_nn hf_font">'+nn+'</p><p class="rs_ven">'+ven_add+'</p>'; 
     frame +=    '</div>'; 
     frame +=    '<div class="rs_tabs"><ul class="'+label+'"><li class="t1 nav_tab1 curr_tab hand" rel="1"></li>'; 
     if(art == 1){frame += '<li class="t2 nav_tab2 hand" rel="2"></li>';} 
     if(ven == 1){frame += '<li class="t3 nav_tab2 hand" rel="3"></li>';} 
     frame +=    '</ul></div>'; 
     frame +=    '<div id="rs_content"><div class="tab_body tab1" ></div>'; 
     if(art == 1){frame += '<div class="tab_body tab2"></div>';} 
     if(ven == 1){frame += '<div class="tab_body tab3"></div>';} 
     frame +=    '</div>'; 
     frame +=    '</div>'; 
     $('#wrap_right').append(frame); 
    }; 


    //load or show required tab 
    function do_tab(id, tab){ 
     console.log('function called: do_tab'); 
     //hide other tabs 
     $('#rs_'+id+' .tab_body').hide(); 
     //mark current(clicked) tab 
     $('#rs_'+id+' .rs_tabs li').removeClass('curr_tab'); 
     $('#rs_'+id+' .rs_tabs .t'+tab).addClass('curr_tab'); 

     //is the tab already loaded and hidden? 
     var loaded = $('#e'+id).data('t'+tab+'_loaded'); 
     if(loaded === true) 
      { 
       $('#rs_'+id+' .tab'+tab).show(); 
       if (tab == 2) { art_requested(id); } 
      } 
     else 
      { 
       //ajax load in the tab 
       $('#rs_'+id+' .tab'+tab).load('index_files/tab'+tab+'.php?id='+id, function(){     
        //after load callback 
        if (tab == 1) 
         { setup_tab_1(id); } 
        if (tab == 2) { setup_tab_2(id); }         
       }); 
       //mark tab as loaded 
       $('#e'+id).data('t'+tab+'_loaded', true); 
       //fade in current tab 
       $('#rs_'+id+' .tab'+tab).fadeIn(600);   
      } 
    } 


    //mark current event in cal-blocks 
    function mark_current(id){ 
     console.log('function called: mark_current'); 
     $('#cal_blocks .event_sel').removeClass('event_sel'); 
     $('#e'+id).addClass('event_sel'); 
    } 


    //setup tab 1 
    function setup_tab_1(id){ 
     console.log('function called: setup_tab_1');  
     $('#rs_' + id + ' .frame').fadeIn(600); 

     var $img = $('#rs_'+id+' .event_img'); 
     var rel = $img.attr('rel'); 
     if (rel !== '') 
      { 
       $img.live('click', function(){ 
        $.fn.colorbox({href: rel, overlayClose: true}); 
       }); 
      } 

     if($('#wrap_right').data('first_click_made') === false) 
      { 
       //$('#wrap_right').delay(500).slideDown(); 
       //$('#rs_'+id+' .rs_tabs').delay(800).fadeIn(600); 
       load_fb_js(); 
       $('#wrap_right').data('first_click_made', true); 
      } 
     mark_current(id); 
    } 

    //setup tab 2 
    function setup_tab_2(id) { 
     console.log('function called: setup_tab_2'); 
     art_requested(id); 
     $('#rs_'+id+' #art_scrollable').scrollable({ 
      size: 1, 
      easing: 'swing', 
      clickable: false, 
      onBeforeSeek: function(){before();}, 
      onSeek: function(){after();} 
     }).navigator("#art_scroll_nav"); 
     prep_media_carousel(); 
    } 



    //check to see if an artist has been requested 
    function art_requested(id){ 
     console.log('function called: art_requested'); 
     var art_req = $('#e'+id).data('art_req'); 
     if(art_req !== false) 
      { 
       $('#art_'+art_req).click(); 
      } 
    } 


    //scroll artist panes smoothly (scroll bars cause glitches otherwise) 

    function before(){ 
     if(!IE){$('#art_scrollable .bio_etc').css('overflow','-moz-scrollbars-none');} 
    } 

    function after(){   
     if(!IE){$('#art_scrollable .bio_etc').css('overflow','auto');} 
    } 


    // MEDIA CAROUSEL 
    //-------------------------- 

    function prep_media_carousel(){ 
     console.log('function called: prep_media_carousel'); 
     //youtube and soundcloud player 
     $("#rs_content .yt_scrollable a.yt, #rs_content .yt_scrollable a.sc").colorbox({     
      overlayClose : false, 
      opacity : 0 
     });  

     $("#colorbox").easydrag(true); 
     $('#cboxOverlay').remove(); 
    } 


    function make_carousel_scrollable(unique_id){ 
     console.log('function called: make_carousel_scrollable'); 
     $('#scroll_'+unique_id).scrollable({ 
      size:1, 
      clickable:false, 
      nextPage:'#r_'+unique_id, 
      prevPage:'#l_'+unique_id 
     }); 
    } 


    function check_l_r_arrows(total, counter, art_id){ 
     console.log('function called: check_l_r_arrows'); 
     //left arrow 
     if(counter > 0) 
      { 
       $('#l_'+art_id).show(); 
       $('#l_'+art_id+'_inactive').hide(); 
      } 
     else 
      { 
       $('#l_'+art_id).hide(); 
       $('#l_'+art_id+'_inactive').show(); 
      } 

     //right arrow 
     if(counter < total-3) 
      { 
       $('#r_'+art_id).show(); 
       $('#r_'+art_id+'_inactive').hide(); 
      } 
     else 
      { 
       $('#r_'+art_id).hide(); 
       $('#r_'+art_id+'_inactive').show(); 
      } 
    } 



    //load facebook scripts 
    function load_fb_js(){ 
     console.log('function called: load_fb_js'); 
     $.getScript('http://static.ak.connect.facebook.com/connect.php/en_GB', function(){ 
      //callback 
      FB.init("89bb37189bede9e30eb07a66b9a1c52a"); 
     }); 
    } 


    // SEARCH 
    //--------------------------------------------------------------------------- 
    function reset_srch_res(){ 
     $('#main_search').fadeOut(400).children().remove(); 
    } 

    function search(q){ 
      console.log('function called: search'); 
      $.ajax({ 
       type: 'GET', 
       url: 'index_files/srch/search.php?q='+q, 
       success: function(e) 
        { 
         $('#main_search').html(e).show();   
        } 
      }); 
    } 
+1

Utilisez-vous ': nth-child()' ou d'autres sélecteurs de position n'importe où dans votre code? –

+0

pas que je peux penser à ... avoir collé le code ci-dessus – Haroldo

+0

ok je l'ai corrigé - était le script facebook connect. Toujours curieux de savoir quel type d'erreurs les utilisateurs normaux/non développeurs obtiennent .. – Haroldo

Répondre

2

Ils obtiennent une petite icône jaune dans le fond, ou bien ils vont voir exactement ce que vous voyez, en fonction de la façon dont le navigateur est configuré. Je suspecte que, d'une certaine façon, votre page est pas sans faille. Vous devriez être capable d'utiliser les outils de développement pour vérifier une trace de pile et déterminer où se trouve l'erreur dans votre code. Alternativement, vous pouvez mettre du code entre les blocs try/catch et chercher l'erreur de cette façon.

[modifier] Voici ce que le navigateur affiche, dans le coin en bas à gauche: alt text http://gutfullofbeer.net/err.png

Double-cliquez sur cette affiche la même boîte de dialogue d'erreur que vous voyez.

Questions connexes