|
||
|
|||
|
When I search by some Keyword
I want display the result and Highlight me keyword for example: Keyword: Java "Java" display different from rest text any way: strong or change color ...etc my code use <c:forEach to display the result
|
|
||||
|
Hello Mohd,
Have you already coded the search function? You just need to insert HTML tags before and after the keyword. Java Code
<strong><font color="red">JAVA</font></strong>
__________________
Don't forget to add syntax highlighted code tags around your code: [highlight=Java] code here [/highlight] Forum Tip: Add to peoples reputation ( ) by clicking the button on their useful posts.
|
|
|||
|
Java Code
<c:forEach var="book1" items="${bookList}">
<tr>
<td>
<c:url var="listThreadsUrl" value="BookDetailsServlet">
<c:param name="id" value="${book1.id}"/>
</c:url>
<a href='<c:out value="${listThreadsUrl}"/>'>
${book1.title}
</a>
</tr>
</c:forEach>
and here display the result my result is " book1.title " if you search for Java may will find "Java How to Program" Java here should be different |
|
|||
|
in jsp it is possible but how in command prompt
__________________
paruchuri |
|
|||
|
There is solution by using javascript
I found this one Search Engine Keyword Highlight with Javascript | SYP but I didn't know how to use it in jsp |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Patricia Trie Search | javaguy | What's Wrong With My Code? | 0 | 21-07-2008 06:54 PM |