Ok here is the problem.
i have 3 fields , 1 select box, 1 input, 1 answer field, what i have so fare is an auct complete script when you enter the first few letters in the input12 field it auto completes in both input12 & the options menu. the 3rd field is dead what i need is onchange a second value for an amount eg”€200″ to be entered in the amount field. I think at this stage i am confusing my self. So here is the script. i know there is a lot there but could someone help PLEASE!!!!!!!!!
Kind Regards
Aiden
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-<option>” />
<title>Untitled Document</title>
<script>
<!–
function autoComplete (field, select, property, forcematch) {
var found = false;
for (var i = 0; i < select.options.length; i++) {
if (select.options[i][property].toUpperCase().indexOf(field.value.toUpperCase()) == 0) {
found=true; break;
}
}
if (found) { select.selectedIndex = i; }
else { select.selectedIndex = -1; }
if (field.createTextRange) {
if (forcematch && !found) {
field.value=field.value.substring(0,field.value.length-1);
return;
}
var cursorKeys =”8;46;37;38;39;40;33;34;35;36;45;”;
if (cursorKeys.indexOf(event.keyCode+”;”) == -1) {
var r1 = field.createTextRange();
var oldValue = r1.text;
var newValue = found ? select.options[i][property] : oldValue;
if (newValue != field.value) {
field.value = newValue;
var rNew = field.createTextRange();
rNew.moveStart(‘character’, oldValue.length) ;
rNew.select();
}
//–>
</script>
</head>
<body>
<p> </p>
<form id=”form<option>” name=”form<option>” method=”post” action=””>
<label><input type= “text” name=”input12″ value=”” onkeyup=”autoComplete(this,this.form.options,’value’,true)” />
<select name= “options” onchange=”this.form.input1.value=this.options[this.selectedIndex].value”>
<option value=”Abbey Park”>Abbey Park</option>
<option value=”Abbotstown Ave.”>Abbotstown Ave.</option>
<option value=”Adelaide Rd.”>Adelaide Rd.</option>
<option value=”Ailesbury Rd.”>Ailesbury Rd.</option>
<option value=”Airport (Dublin)”>Airport (Dublin)</option>
<option value=”Albert Rd.”>Albert Rd.</option>
<option>Alexandra Basin (Ext. Gates)</option>
<option>Alexandra Rd.</option>
<option>All Saints Rd.</option>
<option> Allenton Estate</option>
<option>Amiens St.</option>
<option>Angelsea Rd.</option>
<option>Annamoe Rd.</option>
</select>
</label>
<input name=”amount” type=”text” value”” readonly=””/>
<label>
<input name=”Button” type=”button” value=”Button” />
</label>
</form>
</p>
<label></label>
<p>
<label></label>
</p>
</body>
</html>
?