$_POST["data"] → "data" が見つからないというエラーが出る
PHPを呼び出す際に何かまちがっているのだと思うのですが、どうでしょうか?
※fileCom はグローバル変数です
function send()
{
//↓IEとそれ以外でオブジェクトの生成方法を変えている↓
if (window.XMLHttpRequest){
fileCom = new XMLHttpRequest();
}else{
if (window.ActiveXObject){
fileCom = new ActiveXObject("Microsoft.XMLHTTP");
}else{
fileCom = null;
}
}
//↑IEとそれ以外でオブジェクトの生成方法を変えている↑
//↓コメントの保存↓
fileCom.open("POST", "writeCom.php");
var gotCom = document.getElementById("edit").value;
//コメントサイズ取得
var getedComSize;
if(document.getElementById("hutuu").checked==true){
gotComSize = "30";
}
if(document.getElementById("dai").checked==true){
gotComSize = "50";
}
if(document.getElementById("tokudai").checked==true){
gotComSize = "80";
}
fileCom.send("comData=gotCom&comSizeData=gotComSize");
//↑コメントの保存↑
}
$comment = $_POST["comData"];
$comSize = $_POST["comSizeData"];
と指定しています。