• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to display the retrive data in select drop down list

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Sir/Madam,
The DATA IS SUCCESFULLY RETRIVE FROM data.txt (data.txt contains: Sumanta,Harish,Jiban).Sir my doubt is i want to display the same data in
select drop list.Could you please help me how to write it.

Please look my code mentioned in the below.


<tr>
<td>Subject of Issue
<select name="selName">
<option value="" selected>---Select the Issue---</option>

<%
try{
String theBR;
String txtValue = "";
File fin=new File("C:/TestData/data.txt");
FileReader fr=new FileReader(fin);
BufferedReader br=new BufferedReader(fr);
theBR=br.readLine();
String[] theSplit=theBR.split(",");
for(int i=0;i<theSplit.length;i++)
out.write(" - "+theSplit[i]);
}catch(Exception Ex){
System.out.println("exception in getting connection"+Ex.getMessage());
}
%>


</select>


Thanks and Regards,
Sumanta Panda
[ November 25, 2008: Message edited by: Bear Bibeault ]
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Sir/Madam,
I am getting stuck to resolve this problem.Kindly give me some idea or rectify my code.

Thanks a lot in Advance.
 
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please use the code UBB while posting your codes. It will be very helpful of you.

 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Sudipt Sir,
What is code UBB ?

Regards
Sumanta Panda
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you type a message immediately below you will see "Instant Graemlins" and by it's right side you see "Instant UBB Code".In the Instant..... section you see a button labelled 'CODE'.
Paste your code between the . It will format your code, making it easy to read.

And the name is SUDIPTO.
Thank you.


 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Sudipto Sir,
Thanks a lot for your quick response.This issue is resolved.

Regards
Sumanta Panda
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are welcome!
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

try this code...I think it should work.
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Soumik Basu,
Thanks a lot Soumik.

Regards
Sumanta
 
Water! People swim in water! Even tiny ads swim in water:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic