Thursday, May 29, 2008

Google Search Appliances - Referencing External JavaScript

Integrating an external JavaScript for e.g.; Search Highlighter(http://code.google.com/p/javascript-search-term-highlighter/) in Google Search Appliances front-end XSLT can be a little pain. The XSLT will deliver the external javascript declaration as an XHTML compliant output <script type="text/javasript" src="http://www.website.com/external.js" /> and the resultant search page will be blank. To resolve this, simply add a comment between the
script declaration:

<script type="text/javasript" src="http://www.website.com/external.js">
//Comment
</script>

No comments: