0

How to make program that i have one text box and select box,
If i type "a" in text box show all words start with "a" from select box. If i typed "india" in text box then automatically also select "india" from select box in PHP?

4
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by network18
0

a small hint -

function show()
{
	var val = document.getElementById('elem').value;
	//send this "val" to ajax request for the backend page which searches for the "val" and reponse back
	
}
</head>
<body>
<form id="frm" name="frm">
<input type="text" id="elem" name="elem" onkeyup="show();" />
</form>
</body>
0

agree, because that's what people generally do, and which is best done by the ajax.
But he wants to populate the select element depending upon the contents of the textbox, like if the person types 'i' in the textbox then all the countries starting from letter 'i' should show in the select element.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.