﻿
function wValChg1() {
//debugger
    jQuery.ajax({
        type: "get",
        url: "/ajax/ajaxABC.aspx",
        dataType: "text",
        success: function (html) {
            eval(html);
            InitajaxABCList();
        }

    });
}
function InitajaxABCList() {
//debugger
    var html = ""; //搜索abc..
    if (F_DATA.length > 0) {
        html += "<table id=\"ctlABC_dlInitial\" cellspacing=\"0\" style=\"font-weight:bold;width:100%;border-collapse:collapse;\">";
        html += "<tr>";
        for (var j = 0; j < F_DATA.length; j++) {
            html += "<td> <a id=\"abc" + j + "\" href=\"javascript:search('"+F_DATA[j].Initial.replace("'", "")+"')\">" + F_DATA[j].Initial.replace("'", "") + "</a></td>";
        }
        html += "</tr></table>";

    }
    
    document.getElementById("abcInitial").innerHTML = html; //在前台页面设置上span id =abcInitial
}
function search(Initial) {
   // debugger
    jQuery.ajax({
        type: "get",
        url: "/ajax/searchList.aspx?Initial="+Initial,
        dataType: "text",
        success: function (html) {
            eval(html);
            InitSearchList();
        }

    });
}
function InitSearchList() {
    //debugger
 var html = ""; //搜索abc..
    if (S_DATA.length > 0) {
      //  html += "<table id=\"ctlSearch_dlInitial\" cellspacing=\"0\" style=\"width:100%;border-collapse:collapse;\">";
       // html += "<tr>";
        for (var j = 0; j < S_DATA.length; j++) {
           // html += "<td> <a id=\"search" + j + "\" href=\"prodnsln/searchresult.aspx?sid=0&kw="+S_DATA[j].Name.replace("'", "")+"\">" + S_DATA[j].Name.replace("'", "") + "</a></td>";
              html += "<a  id=\"search" + j + "\" href=\"/prodnsln/searchresult.aspx?sid=0&kw="+encodeURI(S_DATA[j].Name.replace("'", ""))+"\">" + S_DATA[j].Name.replace("'", "") + "</a> &nbsp; &nbsp;";
        }
      //  html += "</tr></table>";

    }
    document.getElementById("searchInitial").innerHTML = html; //在前台页面设置上span id =abcInitial
}

