[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - ajax-dynamic list-in jsp
Page 1 of 1

ajax-dynamic list-in jsp

PostPosted: Tue Oct 09, 2007 3:42 am
by hajafazid
hi guyz,

i recently joined in this group, i m doing the project ,so i need the cust info in the drop down list box. currently it is in php ,but i want to do in jsp.can any one help me in this issue...

here my code...

if((request.getParameter("getCountriesByLetters")!=null) && (request.getParameter("letters")!=null))
{
String letters = request.getParameter("letters");
out.println("letters "+ letters+"!");
String oldChar ="/[^a-z0-9A-Z ]/";
letters = letters.replace(oldChar,letters);
ResultSet rs = statement.executeQuery("Select ID,countryName From countries WHERE COUNTRYNAME LIKE '%"+letters+"%'");
System.out.println("The Letter is :"+letters);
while(rs.next()){
out.println(rs.getString("ID")+"###" + rs.getString("COUNTRYNAME")+"|");

}
}

i applied this code i can able to get only the first data. e.g in my database i have country list like Singapore,Srilanka,Syria... but i press S ,only the first element(Singapore) display rest not display.pls help to solve my issue..

thanks

PostPosted: Tue Oct 09, 2007 9:02 am
by Batalf