/    Sign up×
Community /Pin to ProfileBookmark

Display results depending on vaues selected in drop down

Hi All,

I am a new for web development, I am working on a project where i need to display results in a table as per the values selected in the drop down lists in a JSP page.

Ex: If is select “Country” and “State” The table which is in the same JSP page should display all the cities in this “state” and “country”

How do i write event for this.

Thanks in Advance!
-Ranga

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@Big_O_1_Jun 12.2011 — if I understood you correctly, you want to populate a table after a click event on some dropdowns. You could either do this with AJAX or render a new JSP view with the table populated.
Copy linkTweet thisAlerts:
@CharlesJun 12.2011 — Depending on the number of rows on the table I might take a non-Ajax approach. Use CSS to toggle the display. That method is much easier to keep working for those of us that do not use JavaScript. It's also easier to code and runs faster.
Copy linkTweet thisAlerts:
@Big_O_1_Jun 12.2011 — Depending on the number of rows on the table I might take a non-Ajax approach. Use CSS to toggle the display. That method is much easier to keep working for those of us that do not use JavaScript. It's also easier to code and runs faster.[/QUOTE]

If everything is going to be loaded initially, a non AJAX approach will work to hide the ones that are not needed. But either way JavaScript is needed to listen for the event and show the appropriate rows.
×

Success!

Help @rdevalapelly spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.10,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...