File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes JSP + Ajax + combo box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP + Ajax + combo box" Watch "JSP + Ajax + combo box" New topic

JSP + Ajax + combo box

sudhakar annapu reddy

Joined: Jun 27, 2006
Posts: 1
hi all,

i have a JSP page which has two COMBO BOXES on it ,
first combobox is :CourseID second combo box is SemesterID
in this page my main aim is:

in my first combo box if i select one courseID ,the next combo box i.e SemesterID need to updated with out page submitting.
I heard that this feature can get by using AJAX and JAVA SCRIPT in JSP.
Here in my data base in course table for example i have 4 course IDs:MTECH
in semester table i have for particular MTECH courseID i have these semesterIDs:sem1
sem3 sem4

and for MCA courseID i have these semesterIDs:sem1
sem6 etc..

here my problem is in my page,in first combo box if i select courseID as: MTECH, in second combobox
i need to get semesterIDs as:sem1,sem2,sem3,sem4.
else if i select courseID as:MCA, in second combo box
i need to get semesterIDs as:sem1,sem2,sem3,sem4,sem5,sem6.

This is the feature i need .Any body help me please. give me Sample code for this in AJAX+JSP+JAVA SCRIPT.
[ June 27, 2006: Message edited by: Bear Bibeault ]
Balasubramani Dharmalingam
Ranch Hand

Joined: Dec 06, 2004
Posts: 116

Here you can find the taglibraries for achieving this.

Balasubramani SD,<br />SCJP 1.4,SCWCD 1.4,SCJP 5.0<br /><a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: JSP + Ajax + combo box
It's not a secret anymore!