From 3fdc19f0d4d8c1c5fa286b62f6dbf32823b724a6 Mon Sep 17 00:00:00 2001 From: "Anders S. Mortensen" Date: Thu, 11 Jan 2007 11:14:16 +0000 Subject: [PATCH 1/1] Register onclick handlers to pager anchors as anonymous functions. --- www/demo/search.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); -- 1.7.10.4