Link to home
Start Free TrialLog in
Avatar of mhoggatt1
mhoggatt1

asked on

auto complete box

I received a link from the PHP experts to the code below. I am trying to modify it to work with my PHP code. It is an auto complete box with a text box beside it. When a name is typed it comes up in the dropdown menu. When I tried to execute the code it wouldn't change the dropdown menu.
Thanks,
Michael
SOLUTION
Avatar of archrajan
archrajan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mhoggatt1
mhoggatt1

ASKER

Sorry guys, I forgot to paste the code -

<HTML>
<HEAD>
      <TITLE>JavaScript Toolbox - Auto-Complete</TITLE>
<SCRIPT LANGUAGE="JavaScript" SRC="compact/js_ac.php"></SCRIPT>
</HEAD>
<BODY BGCOLOR=#000000 LINK="#00615F" VLINK="#00615F" ALINK="#00615F">
<BR>
<U><B>Example:</B></U>
<BR>

<FORM>

<B>Auto-Complete</B><BR>
Start typing a name in the input box that matches a name in the drop-down...<BR>
<INPUT TYPE="text" NAME="input1" VALUE="" ONKEYUP="autoComplete(this,this.form.options,'value',true)">
<SELECT NAME="options"
onChange="this.form.input1.value=this.options[this.selectedIndex].value">
      <OPTION VALUE="adam">adam
      <OPTION VALUE="george">george
      <OPTION VALUE="matt">matt
      <OPTION VALUE="bill">bill
      <OPTION VALUE="greg">greg
      <OPTION VALUE="bob">bob
      <OPTION VALUE="david">david
      <OPTION VALUE="ryan">ryan
</SELECT>

</FORM>

</BODY>
</HTML>

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks very much for the code, it's really appreciated. I'll add/split points !
Michael