Someof the results contain apostrophes, e.g "WEGENER'S GRANULOMATOSIS" so that the links created reads
Code:
><a href="#" onclick="DisplaySelectedResult('WEGENER'S GRANULOMATOSIS')">WEGENER'S GRANULOMATOSIS</a>
The extra single quote fouls up the JavaScript
There are a few ways to fix this. The easiest, in my opinion, is to have the service return the links like:
Code:
><a href="WEGENER'S GRANULOMATOSIS" onclick="DisplaySelectedResult(this.href);return false;">WEGENER'S GRANULOMATOSIS</a>
As a side issue the lang attribute on the script element is incorrect. This refers to the natural language. You should also avoid "language" as this is now deprecated. The official way is to state the mimetype:
Code:
<script type="text/javascript" src=...
--
Joe (
Microsoft MVP - XML)