Knowledgebase Home Page  >  SearchUnit
Search the Knowledge Base
Using ResultPreview without using the SearchResult control.
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=250&catId=54

Options

Print this page
Email this to a friend

It’s possible to use the AJAX ResultPreview feature even when not using the SearchResult control, you just have to built the link/javascript yourself.

 

For each ResultPreview icon you want, use this block (be careful not to change the element heiracrchy)

 

<span class='sew_previewResultWrapper'>...<img alt="Click to preview the document text"

onclick="sew_toggleResultPreview(this, 'http://.../document..url', 'ResultPreview_Expander_Closed.png', 'ResultPreview_Expander_Opened.png')"

src="ResultPreview_Expander_Closed.png" /><span class='sew_previewResultContent'>Loading

document...</span></span>

 

where;

'http://.../document..url' will be the URL of the result item (ie the document that is previewed)

'ResultPreview_Expander_Closed.png', 'ResultPreview_Expander_Opened.png' are images from our Keyoti_SearchEngine_Web_Common folder

 

 

To make it work you must include these client files on the page too

 

<script src="ResultPreview.js" type='text/javascript'></script>

<script src="Core.js" type='text/javascript'></script>

<link rel='stylesheet' href='ResultPreview.css'  type='text/css' />

 

You can find those two files in the Keyoti_SearchEngine_Web_Common folder under our install folder.

 


Related Questions:

Attachments:

No attachments were found.