XMLHttpRequest

 function getXmlHttp(){
  if (window.ActiveXObject) {
    try {
      return new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        return new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        return null;
      }
    }
  } else if (window.XMLHttpRequest) {
    return new XMLHttpRequest();
  } else {
    return null;
  }
 }
 function getUserName(user_id) {
  var xmlhttp = getXmlHttp();
  xmlhttp.onreadystatechange = function () {
    if (xmlhttp.readyState == 4) {
      var text = xmlhttp.responseText;
      var user_name = eval(text);
    }
  }
  xmlhttp.open("GET", "index.php?user_id=" + unit_id, true);
  xmlhttp.send();
 }

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS

Last-modified: 2010-11-05 (金) 13:43:50