//URL引数分割&ハッシュ化 function getArgs(){ argHash = new Array(); args = location.search.slice(1).split("&"); var cnt = args.length; for (var i=0; i < cnt ; i++) { var arg = args[i].split("="); argHash[arg[0]] = arg[1]; } return argHash; } function comRes() { //パラメータ取得 var argsHash = getArgs(); var tparam = ""; if($("CID").value != undefined) { tparam = $("CID").value; } var pageNo = 1; if (argsHash["pno"] == undefined){ pageNo = 1; } else { pageNo = parseInt(argsHash["pno"]); if(isNaN(pageNo)) { pageNo = 1; } } if(tparam != "") { linkURL = "http://order.nifty.com/cs/kuchikomi/magazine_topic/list/aid_" + tparam + "/" + pageNo + ".htm"; var sc = document.createElement('script'); sc.setAttribute("type","text/javascript"); sc.setAttribute("src", linkURL); sc.setAttribute("charset", "Windows-31J") document.getElementsByTagName("body").item(0).appendChild(sc); // var opt = { // method : 'post', // encoding: 'shift_jis', // onComplete: function(res) { // if((199 < res.status) && (res.status < 300)) { // $("CommentList").innerHTML = res.responseText; // } else { // $("CommentList").innerHTML = "" + res.statusText + "〔" + linkURL + "〕"; // } // }, // onFailure: function() { // } // }; // // new Ajax.Request(linkURL, opt); } }