By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,805 Members | 1,350 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,805 IT Pros & Developers. It's quick & easy.

Dropdown list related Question

P: 5
Hi bhavya here, i completed my project, in tht i added some items in to the dropdown list dynamically like from database... nw i need to select a perticular name of item n need to send a message, bt i dono hw to select a perticular item from dropdown list... can anyone guide me... wait for ur reply...

Bhavya.G
Apr 16 '13 #1
Share this Question
Share on Google+
7 Replies


10K+
P: 13,264
What did you use for the drop down? A JCombobox or was it web based?
Apr 16 '13 #2

P: 5
i did project in struts2, so i used select tag itseems, so tht i can add all the frnds which r present in database can add into dropdown list dynamically...

Bhavya.G
Apr 16 '13 #3

P: 5
Hi, i ve attached snap shot also... here u can check in drop down list u can see 2 email id's which s prsent in database... whn i send msg to tht selected email id its nt getting select tht email id frm dropdown list... bhavya.docx, here s a snap shot of tht window...

Bhavya.G
Apr 16 '13 #4

10K+
P: 13,264
You can get the submitted values at the server side using request.getParameterValues
Apr 17 '13 #5

P: 5
no... i think u r nt getting my question... i wanna send a msg to selected email id from drop down list... u can see tht edit box beside tht dropdown list na, der i jst type a msg n click on send button, so tht tht selected email id's slno should store in database... so here i jst wanna hide tht email id frm drop down list... i dint get tht code so need ur help....

Bhavya.G...
Apr 17 '13 #6

10K+
P: 13,264
You can add that selected value to requestScope or sessionScope.
Then when building the values in the select you can use JSTL c:if to skip the value if it is the same as the passed in value.
Apr 17 '13 #7

P: 5
already i added tht in session during jdbc itseems... so tht only im iterating over all the items present in database it select the perticular email id's which s related to login id...i hide tht id itseems using tht value which s stored in session...
Apr 17 '13 #8

Post your reply

Sign in to post your reply or Sign up for a free account.