reloading of page with dropdown list populated on selecting first dropdown
Hi all,
Can some post Java, javascript code for
reloading of page with dropdown list populated on selecting first dropdown
3 dropdowns, data fetched from backend sql and displayed in dropdown1.
on selecting the value, the page reloads and the list is fetched from backend and displayed in dropdown2 in accordance with the selected value of dropdown1..
i know it cannot be done only with javascript..
can some post the code using java and javascript with HTMl..
It can be done with javascript, and no page reload.
Check out the Prototype API, it makes Ajax calls easier. It's pretty simple, just sends a request, and returns the results. http://www.prototypejs.org/learn/introduction-to-ajax
But if you need the page to be reloaded, I'd just use a submit a form, either to a servlet which redirects back to the page, or to itself with a call to the backend process in it, though the latter probably isn't very good practice.
Bookmarks