princessk1
Programmer
I am trying to change the value of one textbox on my ASP page when the values of the other textbox are changed by the user. Is it possible to get the value of a textbox on the page without submitting the form?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>You say Yes, I say No</title>
</head>
<body>
<form name="answers">
What is?<input type="text" name="assertion" value="A" onchange="deny()">
<br>
What is not.<input type="text" name="denial" value="A is not A">
</form>
<script>
function deny(){
var fieldOne = document.answers.assertion.value;
var fieldTwo = fieldOne + " is not " + fieldOne;
document.answers.denial.value = fieldTwo;
}
</script>
</body>
</html>