JSP: auto populate drop down select box

Hi there,

Is anyone here is has example of code for JSP, i found tons of them with PHP:

http://www.codingcereal.com/demo/index.php?m=jquery-autopopulate-select-dropdown-box
http://www.jensbits.com/2010/03/29/jquery-ui-autocomplete-widget-with-php-and-mysql/

i would like to use it on Jdev with oracle database, any one kind please share
some example for me.

thanks
LVL 7
boon86Asked:
Who is Participating?
 
chaitu chaituCommented:
http://www.roseindia.net/answers/viewqa/Ajax/12186-Auto-Complete-Text-Box---JSP-Servlet.html



function showState(str){ 

	$.ajax({
		 type: 'GET',
		 url:  "get.jsp";url += "?count=" +str,
		 success: function(msg){ 		 
			 $("#country").val(msg);
		}   
	});
	}

Open in new window

0
 
chaitu chaituCommented:
url:  "get.jsp?count=" +str,
0
 
boon86Author Commented:
the example you provided is autocomplete for text box, i need drop down
0
 
chaitu chaituCommented:
<select name='item'  size='10' onchange="showState(this.value)">
<option value='1'>One</option>
<option value='2'>Two</option>
<option value='3'>Three</option>
<option value='4'>Four</option>
<option value='5'>Five</option>
<option value='5'>Six</option>
</select>

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.