Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to display the retrive data in select drop down list  RSS feed

 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
sudipto shekhar
Ranch Hand
Posts: 826
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Dear Sudipt Sir,
What is code UBB ?

Regards
Sumanta Panda
 
sudipto shekhar
Ranch Hand
Posts: 826
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • 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
  • 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
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are welcome!
 
Soumik Basu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Dear Soumik Basu,
Thanks a lot Soumik.

Regards
Sumanta
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!