I'm obviously a novice at Javascript. I would appreciate any help/push in the right direction.
Thanks in advance
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Javascript - Preview as you type</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<STYLE TYPE="text/css">
<!--
.MyClass {
font-family: Helvetica, sans-serif;
font-size: 12pt;
color: blue;
font-weight: bold
}
.MyClass_B {
font-family: Helvetica, sans-serif;
font-size: 12pt;
color: red;
font-weight: bold
}
-->
</STYLE>
<script language="JavaScript">
<!--
function changeCard(dest, src) {
if ((document.all)||(document.getElementByID)) {
var dSpan = eval('document.all.' + dest);
var sText = eval('document.frm1.' + src);
switch (src) {
case 'ThePersonName':
dSpan.innerHTML = sText.value + '<br>'
break;
}
}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<form name="frm1" action="MyScript.name" method="post">
<table width="500" align="center" cellpadding="0" cellspacing="0" border="1">
<tr>
<th width="50%">Form Entry</th>
<th width="50%">On Screen View</th>
</tr>
<tr>
<td>
<input type="text"
name="ThePersonName"
size="20"
onkeyup="changeCard('spPerson','ThePersonName');"
onchange="changeCard('spPerson','ThePersonName');"
style="font-family:monospace"
value=""
maxlength="50">
</td>
<td class="MyClass">
<span id="spPerson"></span>
</td>
</tr>
<tr>
<td><input type="submit" name="submit" value="Submit"></td>
<td class="MyClass_B">Text entered in Form Field should appear in BLUE in box above this one</td>
</tr>
</table>
</form>
</body>
</html>
Thanks in advance
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Javascript - Preview as you type</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<STYLE TYPE="text/css">
<!--
.MyClass {
font-family: Helvetica, sans-serif;
font-size: 12pt;
color: blue;
font-weight: bold
}
.MyClass_B {
font-family: Helvetica, sans-serif;
font-size: 12pt;
color: red;
font-weight: bold
}
-->
</STYLE>
<script language="JavaScript">
<!--
function changeCard(dest, src) {
if ((document.all)||(document.getElementByID)) {
var dSpan = eval('document.all.' + dest);
var sText = eval('document.frm1.' + src);
switch (src) {
case 'ThePersonName':
dSpan.innerHTML = sText.value + '<br>'
break;
}
}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<form name="frm1" action="MyScript.name" method="post">
<table width="500" align="center" cellpadding="0" cellspacing="0" border="1">
<tr>
<th width="50%">Form Entry</th>
<th width="50%">On Screen View</th>
</tr>
<tr>
<td>
<input type="text"
name="ThePersonName"
size="20"
onkeyup="changeCard('spPerson','ThePersonName');"
onchange="changeCard('spPerson','ThePersonName');"
style="font-family:monospace"
value=""
maxlength="50">
</td>
<td class="MyClass">
<span id="spPerson"></span>
</td>
</tr>
<tr>
<td><input type="submit" name="submit" value="Submit"></td>
<td class="MyClass_B">Text entered in Form Field should appear in BLUE in box above this one</td>
</tr>
</table>
</form>
</body>
</html>