This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes auto complete Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "auto complete" Watch "auto complete" New topic
Author

auto complete

priya pratheepp
Ranch Hand

Joined: Apr 02, 2008
Posts: 59
Hi friends,

I am doing one auto complete program using jsp,js-query..

It is working fine .When i type the first letter the corresponding datas are displaying.
When i select or click the data i can't able to select that and disply that in the text box.getting the error of can not find rs..

Please help
code where i am getting problem is


html code where fill method is


Thanks in advance
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Originally posted by priya pratheepp:
I am doing one auto complete program using jsp,js-query..
Do you mean jQuery?

getting the error of can not find rs..

What is rs? Where is it defined?

It would be much more helpful to show the exact error message rather than a paraphrasing.

out.println("<li onClicks='fill(\" + \" + rs.getString(1)+ \"+ \");'>"+ rs.getString(1) +"</li>");


Why on earth are you using out.printlin inside a JSP to emit markup? The whole purpose of a JSP to allow you to use template text so that you don't have to generate markup inside Java strings.

From looking at this I assuming that the HTML markup you are sending to the browser may not be correct. Do a View Source in the browser and check the HTML and JavaScript that the JSP is generating.
[ May 11, 2008: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
priya pratheepp
Ranch Hand

Joined: Apr 02, 2008
Posts: 59
yes jquery...

but i got the solution.I wrongly put to "

thanks
 
Consider Paul's rocket mass heater.
 
subject: auto complete
 
Similar Threads
dynamic query to display dynamic results??
Embedding Lists in XHTML
Passing parameter from popup
JQuery replace div
how to use logic:iterate for ArrayLists withing Collection