initial commit
[emacs-init.git] / nxhtml / tests / in / bug-311640-index.html
1 <script type="text/javascript">
2   // Set this to the URL you used to fetch recommendations, whether you
3   // fetched them on the client or the server.
4   var request_url = '%(json_url)s';
5
6   // This function is used track click-throughs by fetching a web
7   // beacon.n
8   function trackClickThrough(elem) {
9   var img = new Image();
10   img.src = '%(beacon_url)s' +
11   '?request_url=' + escape(request_url) +
12   '&click_through_url=' + escape(elem.href);
13   return true;
14   }
15 </script>
16
17 <p>
18   <!--
19       Imagine this is one of the recommendations that was returned.
20       Just add an onclick handler that calls trackClickThrough.
21   -->
22   <a href="http://www.google.com"
23      onclick="return trackClickThrough(this);">Click me!</a>
24 </p>