We currently have a search page where hotels are listed dynamically via ajax calls.And per displayed hotel we have to display a tripadvisor widget. A sample tripadvisor widget code is as follows
<div id="TA_rated485" class="TA_rated">
<ul id="mdJZap41Mwg" class="TA_links shznH7pJf">
<li id="NnfwdIAYy" class="e9ZmnKZxo"><a href=http://www.tripadvisor.com/Hotel_Review-g190454-d228070-Reviews-Hotel_Royal-Vienna.html>Hotel Royal</a></li>
</ul>
</div>
<script src="http://www.jscache.com/wejs?wtype=rated&uniq=485&locationId=228070&lang=en_US"></script>
The fun part is that the script tag links to a script which uses document.write. As this is after the page onload and called during an ajax call loop the document gets rewritten. Is there any work around in order to have the document.write not rewrite the page or a workaround for the widget where the widget is integrated in a different way other than the current document.write technique.