[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
Advertisement

ajax-dynamic list-in jsp

Moderators: Calcifer, slothy

ajax-dynamic list-in jsp

Postby hajafazid » Tue Oct 09, 2007 3:42 am

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
hajafazid
 
Posts: 1
Joined: Mon Oct 08, 2007 5:41 am

Postby Batalf » Tue Oct 09, 2007 9:02 am

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm


Return to General questions regarding AJAX scripts

Who is online

Users browsing this forum: No registered users and 7 guests

cron