32 lines
923 B
HTML
Executable File
32 lines
923 B
HTML
Executable File
<html>
|
|
<head>
|
|
<script>
|
|
function handler()
|
|
{
|
|
if(this.readyState == 4)
|
|
{
|
|
var contents = this.responseText;
|
|
document.getElementById("myDiv").innerHTML = contents;
|
|
}
|
|
return;
|
|
}
|
|
|
|
function callXHR()
|
|
{
|
|
var textBoxValue = document.getElementById("freeTextField").value;
|
|
var client = new XMLHttpRequest();
|
|
client.onreadystatechange = handler;
|
|
client.open("POST", "page13.php", true);
|
|
client.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
|
|
client.send("freeTextField="+textBoxValue);
|
|
return;
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="myDiv" style="location: absolute; top: 100px; left: 100px; height: 400px; width: 400px; background-color: #ff0000;"></div>
|
|
<input type="text" id="freeTextField" name="freeTextField" value="DEFAULT_SHOULD_BE_CHANGED"></input>
|
|
<button onclick="return callXHR();">SUBMIT</button>
|
|
</body>
|
|
</html> |