From: Anders S. Mortensen Date: Thu, 11 Jan 2007 11:14:16 +0000 (+0000) Subject: Register onclick handlers to pager anchors as anonymous functions. X-Git-Tag: rather.stable.2007.01.11~4 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;ds=sidebyside;h=3fdc19f0d4d8c1c5fa286b62f6dbf32823b724a6;hp=f9130dd792cd1f6d021984a7b58cb5cedffdda07;p=pazpar2-moved-to-github.git Register onclick handlers to pager anchors as anonymous functions. --- diff --git a/www/demo/search.js b/www/demo/search.js index 9ef3be4..fc1a0bf 100644 --- a/www/demo/search.js +++ b/www/demo/search.js @@ -1,4 +1,4 @@ -/* $Id: search.js,v 1.18 2007-01-11 10:18:38 sondberg Exp $ +/* $Id: search.js,v 1.19 2007-01-11 11:14:16 sondberg Exp $ * --------------------------------------------------- * Javascript container */ @@ -170,7 +170,10 @@ function make_pager (hits, offset, max) { } page_elem.setAttribute('href', '#'); - page_elem.setAttribute('onclick', 'update_offset(' + off + ')'); + page_elem.setAttribute('off', off); + page_elem.onclick = function () { + update_offset(this.getAttribute('off')); + }; div_elem.appendChild(page_elem); div_elem.appendChild(newline_node);