2011-06-22 8 views
2

Firebugは上記のエラーを発生させます。私はどこで修正を探すべきか分かりません。 $ v_0がnullです [このエラーで中断する] var $ v_1 = $ v_0.parentElement();私はこの行を以下のコードで見ていません。提案してください。 (私が投稿した静的コードhttp://www.codeupload.com/4063はここにあります)

私は負のポイントは望んでいませんが、コード全体を入れることはできません。

<center> 
<div id="BackgroundFrame"> 
    <div id="slides"> 
     <div class="slides_container"> </div>   
     <a href="#" class="prev"><img src="_layouts/jquery/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a> 
     <a href="#" class="next"><img src="_layouts/jquery/arrow-next.png" width="24" height="43" alt="Arrow Next"></a> 
    </div> 
    <img src="_layouts/jquery/example-frame.png" width="739" height="341" alt="Example Frame" id="frame"> 
</div>  
</center> 
<link rel="stylesheet" href="_layouts/jquery/global.css"> 
<script type="text/javascript" src="_layouts/jquery/jquery-1.6.1.min.js"></script> 
<script type="text/javascript" src="_layouts/jquery/slides.min.jquery.js"></script> 
    <script> 
     $(function(){ 
      $('#slides').slides({ 
       preload: true, 
       preloadImage: 'img/loading.gif', 
       play: 5000, 
       pause: 2500, 
       hoverPause: true, 
       animationStart: function(current){ 
        $('.caption').animate({ 
         bottom:-50 
        },100); 
        if (window.console && console.log) { 
         // example return of current slide number 
         console.log('animationStart on slide: ', current); 
        }; 
       }, 
       animationComplete: function(current){ 
        $('.caption').animate({ 
         bottom:0 
        },200); 
        if (window.console && console.log) { 
         // example return of current slide number 
         console.log('animationComplete on slide: ', current); 
        }; 
       }, 
       slidesLoaded: function() { 
        $('.caption').animate({ 
         bottom:0 
        },200); 
       } 
      }); 
     }); 
    </script> 
<script> 
    function GetAllImages() 
    { 
     $("#slideshowPicturePlaceholder").css("display", "block"); 
     var soapEnv = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Body><GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>"; 
     soapEnv += "<listName>News with Pictures</listName>"; 
     soapEnv += "<query><Query><Where><Eq> <FieldRef Name='Active'/> <Value Type='Boolean'>1</Value> </Eq> </Where><OrderBy Override='TRUE'><FieldRef Name='Created' Ascending='FALSE' /></OrderBy></Query></query>"; 
     soapEnv += "<viewFields><ViewFields><FieldRef Name='Title'/><FieldRef Name='ows_FileLeafRef'/><FieldRef Name='NewsLink'/></ViewFields></viewFields><rowLimit></rowLimit>";  
     soapEnv += "</GetListItems></soapenv:Body></soapenv:Envelope>"; 

     var port = window.location.port; 
     if (port.length <= 0) 
     port = ""; 
     else 
     port = ":" + port; 
     var webservice = window.location.protocol + "//" + window.location.hostname + port + L_Menu_BaseUrl + "/_vti_bin/lists.asmx"; 

     $.ajax(
     { 
      url : webservice, 
      type : "POST", 
      dataType : "xml", 
      data : soapEnv, 
      complete : processQueryResults, 
      contentType : "text/xml; charset=utf-8", 
      error : function (xhr) 
      { 
      alert('Error! Status = ' + xhr.status); 
      } 
     }); 
    } 
    function processQueryResults(xData, status) 
    { 
     var port = window.location.port; 
     if (port.length <= 0) 
     port = ""; 
     else 
     port = ":" + port; 
     // Change the below to point to your image library 
     var imageURL = window.location.protocol + "//" + window.location.hostname + port + L_Menu_BaseUrl + "/Splash Image Rotator/"; 
     var itemURL = window.location.protocol + "//" + window.location.hostname + port + L_Menu_BaseUrl + "/Splash Image Rotator/Forms/DispForm.aspx?ID="; 

     $(xData.responseXML).find("z\\:row").each(function() 
     { 
      var title = $(this).attr("ows_Title"); 
      var imageLink = imageURL + $(this).attr("ows_FileLeafRef").substring($(this).attr("ows_FileLeafRef").indexOf('#') + 1); 
      var itemLink = $(this).attr("ows_NewsLink"); 
      var liHtml = "<div class='slide'><a href='"+itemLink+"' target='_blank' border='0'><img width='420' height='220' src='" + imageLink +"'/></a>" + "<div class='caption' style=\"bottom:'0'\"><p>" + title + "</p></div></div>"; 
     $("#slides_container").append(liHtml); 
     }); 

    }    
GetAllImages(); 

</script> 
+0

名前が '$ v_0'の変数は、投稿したコードのどこにも表示されません。コンソールは、エラーが発生したファイルをどのファイルですか?私の推測: 'slides.min.jquery.js'。 –

+0

私はそれがjqueryの競合の問題だと思います。 –

+1

sharepointでこれを取得しています... –

答えて

1

プラグインを確認します。それがあなたの問題の原因かもしれません。

+0

あなたはJavaライブラリを意味しますか?画像、リンク、キャプションをハードコードするときに機能します。 –

+1

@Amitabhいいえ、彼は 'slides.min.jquery.js'とそのページに存在する他のjQueryプラグインを意味します。 –