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