From 0536f103b5d4e0feeed7f7aa939e5e40a3b3af68 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 19 Dec 2006 09:07:42 +0000 Subject: [PATCH 1/1] Updated toggle functions git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5424 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/include/focus.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/html/include/focus.js b/html/include/focus.js index 46220ff7a..2c4990121 100644 --- a/html/include/focus.js +++ b/html/include/focus.js @@ -16,6 +16,18 @@ for (iln = 0; iln < len; iln++){ netscape= (ver.charAt(iln+1).toUpperCase() != "C"); +/* Toggle checkbox that matches regex */ +function chk_set_all(regex,value) +{ + for (var i = 0; i < document.mainform.elements.length; i++) { + var _id=document.mainform.elements[i].id; + if(_id.match(regex)) { + document.getElementById(_id).checked= value; + } + } +} + + function scrollDown() { document.body.scrollTop = document.body.scrollHeight - document.body.clientHeight; timeout= setTimeout("scrollDown()", 500); -- 2.30.2