[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

JSP: auto populate drop down select box

Posted on 2011-10-12
5
Medium Priority
?
2,762 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:boon86
  • 3
5 Comments
 
LVL 20

Accepted Solution

by:
chaitu chaitu earned 1200 total points
ID: 36956018
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
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 36956049
url:  "get.jsp?count=" +str,
0
 
LVL 7

Author Comment

by:boon86
ID: 36956057
the example you provided is autocomplete for text box, i need drop down
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 36956076
<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
 
LVL 83

Assisted Solution

by:leakim971
leakim971 earned 800 total points
ID: 36957282
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month19 days, 16 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question