ActiveMailへアクセスするページ(testMail.html)

<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript">

function getData() {
	var node=document.getElementById("bid");
	var bid = node.value ;
	node=document.getElementById("bpw");
	var bpw = node.value;
	if ( ( bid+bpw ) == "" ) {
		alert( "no data" ) ;
		return false ;
	}
	node=document.getElementById("id");
	var id = node.value ;
	node=document.getElementById("pw");
	var pw = node.value;
	if ( ( id+pw ) == "" ) {
		alert( "no data" ) ;
		return false ;
	}

	var url="http://127.0.0.1:8002/httpserv?mode=mail&bid="+bid+"&bpw="+bpw+"&id="+id+"&pw="+pw;

	var script= document.createElement('script');
	script.charset = 'utf-8';
	script.type="text/javascript";
	script.src = url+"&callback=getJSON";
//alert(url);
	document.getElementsByTagName('HEAD')[0].appendChild(script);
}

function getJSON(json) {
/*
	DATA=JSON.stringify(json);
alert(DATA);
*/
	var mdata=json.maildata;
//alert(mdata.length+"\n"+DATA);
	var hh="";
	for(var i=0;i<mdata.length;i++){
		hh+="<tr>";
		hh+="<td>"+mdata[i].date+"</td>";
		hh+="<td>"+mdata[i].from+"</td>";
		hh+="<td>"+mdata[i].title+"</td>";
		hh+="</tr>";
	}
	var nd=document.getElementById("maildata");
	nd.innerHTML="<table border=1>"+hh+"</table>";
}
</script>
</head>

<body>
<h2><font color="#008000"><b><i>Active Mail</i></b></font></h2>
<pre id="inputform">
	BasicID <input type="text" id="bid">
	BasicPW <input type="password" id="bpw" size="20"><br/>

	ユーザーID <input type="text" id="id">
	パスワード <input type="password" id="pw" size="20"><br/>
				<input type="button" value="submit" onClick="getData();">
</pre>
<div id="maildata"></div>
</body>
</html>