2

サイトで SPservices を使用していますが、問題なく動作します。

しかし、携帯電話でサイトにアクセスすると、JQuery は機能しますが、SPservices だけが機能しません。

SPservicesのかなり標準的な使用法だと思います

function updateMat(){
  var id = $("input[title='SolcDescItem']").val();
  //alert(id);
  var query = "<Query><Where><Eq><FieldRef Name='CatDescItem'/><Value Type='Text'>" + id + "</Value></Eq></Where></Query>"
  var marca, desc, serie, fam, formato, costoMuestra, candidad, subtotal;

  $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "catItems",
    CAMLQuery: query,
    CAMLRowLimit: 1,
    completefunc: function (xData, Status) {
      var hasRows = false;
      $(xData.responseXML).find("z\\:row, row").each(function () {
        hasRows = true; 
        //valores
        serie = $(this).attr("ows_CatSerie");                 
        marca = $(this).attr("ows_CatMarca");
        desc = $(this).attr("ows_CatItem");
        fam = $(this).attr("ows_CatFam");
        formato = $(this).attr("ows_CatFormato");
        costoMuestra = $(this).attr("ows_CatCostoMuestra");    
      });
    }
  }); //spservices
  var cost = parseFloat(costoMuestra);
  cantidad = $("input[title='SolcCantidad']").val();
  subtotal = parseFloat(cantidad*cost);
  var multmult=Math.round(subtotal*100)/100;
  $("input[title='SolcSerie']").val(serie);
  $("input[title='SolcMarca']").val(marca);
  $("input[title='SolcFam']").val(fam);
  $("input[title='SolcFormato']").val(formato);
  $("input[title='SolcCostoMuestra']").val(cost);
  $("input[title='SolcItem']").val(desc);
  $("input[title='SolcSubtotal']").val(multmult);
}

リスト "catItems" 内の情報を取得して変数に割り当て、それらの値を SharePoint フォーム フィールドに割り当てます。

バージョンの問題ではないと思いますが、SPservices のさまざまな (すべてではない) バージョンを試しました。

洞察はありますか?他にこの問題を抱えている人はいますか?

前もって感謝します

4

0 に答える 0