<!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title>ajax Post pass value and get pass value example </title>
<script language= "Web Effects" >
function PostText ()
{
var chatbox = document.getElementById ("Utext");
var chat = Chatbox.value;
var getuser = ' admin ';
var getuserid = ' 1 ';
Chatbox.value = "";
var url = ajaxserverpagename+ "? active=addtext&user=" + GetUser + "&userid=" + GetUserID + "&text=" + chat;
var req = Getajax ();
Req.onreadystatechange = function () {
if (req.readystate = = 4 && req.status = 200) {
Req=null;
UpdateAll ();
}
}
Req.open (' Get ', url, true);
Req.send (NULL);
Url=null;
Chat=null;
Chatbox=null;
}
</script>
<body>
<form id= "Form1" Name= "Form1" method= "Post" action= ""
<p>
<label for= "Utext" ></label>
<textarea name= "Utext" id= "Utext" cols= "45" Rows= "5" ></textarea>
</p>
<p>
<input type= " Submit "Name=" button "id=" button "value=" submit "/>
</p>
</form>
</body>
</ Html>