We have a problem demonstrated by the following HTML document.
To see the problem type HV in the first field then use the mouse cursor to
click into the Staff code input box.
You will find that the cursor has ended up in the prompt field rather than
the input.
I think it is due the table dynamically resizing when the description is
added to the second cell, so where your cursor clicked no longer contains
the location of the input box. Is there a fix for this, or a way round it
but we would still like to have dynamic tables ?
Here is the HTML to test it:
<html>
<head>
<TITLE>TEST OF TABLE CHANGE</TITLE>
<SCRIPT TYPE="text/javascript">
function STypeChange() {
switch (document.all.V CLTY.value) {
case 'HV':
document.all.di splaydesVCLTY.i nnerText = ' Health Visitor';
break;
case 'GP':
document.all.di splaydesVCLTY.i nnerText = ' General Practitioner';
break;
default:
document.all.di splaydesVCLTY.i nnerText = '';
break;
}
}
function SCodeChange() {
switch (document.all.V CL.value) {
case 'HV01':
document.all.di splaydesVCL.inn erText = ' Mary Jane Lewis';
break;
case 'GP01':
document.all.di splaydesVCL.inn erText = ' Dr BOB JONES';
break;
default:
document.all.di splaydesVCL.inn erText = '';
break;
}
}
</SCRIPT>
</head>
<body>
TABLE TEST
<BR>
<table width=100% border=0>
<tr>
<td>Staff Type</td><td><INPUT TYPE="TEXT" NAME="VCLTY" SIZE=6
ONCHANGE="SType Change()"><span id='displaydesV CLTY'
class='TITLE1'> </span></td>
<td id='codecell'>S taff Code</td><td><INPUT TYPE="TEXT" NAME="VCL" SIZE=6
ONCHANGE="SCode Change()"><span id='displaydesV CL'
class='TITLE1'> </span></td>
</tr>
</table>
</body>
</html>
Comment