Contact Us
  
 
 
    SearchSearch   RegisterRegister   Log inLog in 

drop down list populated with corresponding values in jsp

drop down list populated with corresponding values in jsp

 
Post new topic   Reply to topic     Forum Index -> Java,Struts framework, Velocity, JSF, Hibernate, Servlet, JSP, javaBeans
View previous topic :: View next topic  
Author Message
juniormember



Joined: 28 Jun 2008
Posts: 154

PostPosted: Thu Aug 14, 2008 5:16 pm    Post subject: drop down list populated with corresponding values in jsp Reply with quote

Hi

I have jsp forms and they have select box in them.
There are drop down lists and on selection of value in first drop list.The corresponding values are to be populated in the the next drop down list and so on.
Many combo box list are there and on based on the relation in every new form.
i don't want jsp page to refresh. just that when the selection is made immediately list is generated in next drop down list box!
Back to top
View user's profile Send private message
javatech



Joined: 19 Jan 2007
Posts: 39

PostPosted: Sun Dec 07, 2008 1:22 pm    Post subject: Reply with quote

If you want to make relationship between select box (combo box), you have to use query which should be dependent on previous value of combo box.

1. You can use Simple JavaScript to hold all value and text value in array of JavaScript and then populate in select box dynamically by onChange function of select tag.

2. If you dont want to hold value in array of Javascript, then use AJAX.
load a page which contain select box which should be shown.

3. jQuery is one more easy option to make relationship between combo box. Check example of jQuery of combox box and plugin.
Back to top
View user's profile Send private message
juniormember



Joined: 28 Jun 2008
Posts: 154

PostPosted: Sun Dec 07, 2008 1:24 pm    Post subject: Reply with quote

Can you give me example or source code to understand easily about this combo box in ajax javascript
Back to top
View user's profile Send private message
javatech



Joined: 19 Jan 2007
Posts: 39

PostPosted: Wed Feb 25, 2009 12:51 pm    Post subject: Reply with quote

You can see this link also

http://www.easywayserver.com/blog/?p=24
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Java,Struts framework, Velocity, JSF, Hibernate, Servlet, JSP, javaBeans All times are GMT
Page 1 of 1

 
Jump to:  
  Quick Post a Reply Topic
     
  Name (required)  
     
  Email Address (will not be published) (required)  
     
  Subject of topic (required)  
     
   
     
   
     
  Advertisement  
     
 
     


  More Links  
 
JSP Introduction
JSP Setup
Simple JSP Example
JSP Variable
Array Declaration in JSP
JSP Forms and User Input
Form Validation
JSP Cookies
JSP Session Object
Loop, content collection, iterator, conditional check in JSP
JSP Application Object
JSP Include
JSP Response Object
JSP Request Object
JSP Error Handling
JSP File Handling Object
JSP Action Tag
JSP Implicit Objects
JSP Declaration
JSP Directive
JDBC Introduction
JDBC Driver
JDBC Connection
JDBC Prepared/Statement
JDBC ResultSet
JDBC Close Connection object
JDBC Insert
JDBC Display Records
JDBC Update
JDBC Delete
JDBC Sorting
JDBC Query
JDBC Exception
JDBC Add Batch
JDBC Transaction/RollBack