dynamically populating listboxes from database

css Belize
  • 14 years ago

    Hi, I am developing a web application using java servlets for the business logic and jsp and java script for the presentation.  I am trying to populate a listbox based on a value selected in a pervious listbox.  However, I want to do this dynamically.  I do not want to refresh the page.

    I know that you can use jsrs to help but I cannot get it to work.  Is there anyone willing to post an example source code of an example.

    Thanks







  • 14 years ago

    I don't quite understand what you mean by "I don't want to refresh the page"...

    Do you mean that page A has a user that selects various boxes, then submits the form and page B then has the appropriate boxes already selected?

    Where does the refreshing bit come in?

    To generate this dynamically (I don't use JSP so can't give you code) you can check for the existence of the variable associated with each checkbox, and if it exists then when you print the code for the checkbox, insert checked="checked" into it....

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“XML is like violence - if it's not working for you, you're not using enough of it.”