|
 |
|
ช่วยดู code ให้ทีครับ ส่งค่า จาก radio แล้วค่ามันไม่ตรงครับ |
|
 |
|
|
 |
 |
|
<html>
<head>
<title></title>
</head>
<script language="JavaScript">
var HttPRequest = false;
function doCallAjax() {
HttPRequest = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
HttPRequest = new XMLHttpRequest();
if (HttPRequest.overrideMimeType) {
HttPRequest.overrideMimeType('text/html');
}
} else if (window.ActiveXObject) { // IE
try {
HttPRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
HttPRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!HttPRequest) {
alert('Cannot create XMLHTTP instance');
return false;
}
var url = 'sac.php';
var rds = "";
for (var i = 0; i < document.getElementsByName("rd").length; i++)
{
if (document.getElementsByName("rd")[i].checked)
{
rds = document.getElementsByName("rd")[i].value;
}
}
HttPRequest.open('POST',url,true);
HttPRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
HttPRequest.setRequestHeader("Content-length", rds.length);
HttPRequest.setRequestHeader("Connection", "close");
HttPRequest.send(rds);
HttPRequest.onreadystatechange = function()
{
if(HttPRequest.readyState == 3) // Loading Request
{
document.getElementById("mySpan").innerHTML = "Now is Loading...";
}
if(HttPRequest.readyState == 4) // Return Request
{
document.getElementById("mySpan").innerHTML = HttPRequest.responseText;
}
}
/*
HttPRequest.onreadystatechange = call function .... // Call other function
*/
}
</script>
<body>
<input type="radio" value="sk1" name="rd" checked="checked">เลือก1
<input type="radio" value="sk2" name="rd" >เลิอก2
<input type="radio" value="sk3" name="rd" >เลือก3
</body>
</html>
|
 |
 |
 |
 |
Date :
2010-10-25 19:26:29 |
By :
extenser |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับ ยังไม่ได้เลย เป็นที่อะไรหรอครับ
|
ประวัติการแก้ไข 2010-10-25 21:00:43
 |
 |
 |
 |
Date :
2010-10-25 20:59:36 |
By :
<- Pp -> |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
<input type="radio" value="sk1" name="rd" id="rd" checked="checked">เลือก1
<input type="radio" value="sk2" name="rd" id="rd" >เลิอก2
<input type="radio" value="sk3" name="rd" id="rd">เลือก3
|
 |
 |
 |
 |
Date :
2010-10-25 21:03:03 |
By :
t-monroe |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณคนที่ตั้งกระทู้และคนที่ตอบกระทู้ทุกคนครับ ขอบคุณครับ
|
 |
 |
 |
 |
Date :
2011-02-10 22:50:48 |
By :
vissarud |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|