CIAO A TUTTI
HO UN PROBLEMA CON QUESTO SCRIPT CHE MI PERMETTE DI SELEZIONARE TRASCINANDO IL MOUSE PIU CHECKBOX INSIEME. LO SCIPT LO PRESO DA QUI ED é VISIBILE ALL'INDIRIZZO

http://javascript.html.it/demo/javas...32/esempio.htm

IO SO QUAL'è IL PROBLEMA MA NON SO COME RISOLVERLO.
VI POSTO IL CODICE FUNZIONANTE

<script type="text/javascript">
function Toggler(elId)
{
var _started = false;
var _checked = false;
var _firstTarget;
var _el;

init();

/* hooks up the */
function init()
{
_el = document.getElementById(elId);
if(_el) _el.onmousedown = _checkInit;
}

function _checkInit(e)
{
e = e || window.event;
_firstTarget = e.srcElement || e.target;
if(_firstTarget && _firstTarget.nodeType == 1 && _firstTarget.type == 'checkbox' && !_started)
{
_checked = !_firstTarget.checked;
_firstTarget.onmouseout = function(){_firstTarget.checked = _checked;}
_el.onmouseup = _stop;
_start();
}
}

/* private method to actually toggle the checkbox */
function _toggleCheckbox(e)
{
e = e || window.event;
var target = e.srcElement || e.target;
if(target && target.nodeType == 1 && target.type == 'checkbox')
{
target.checked = _checked;
}
}

/* private method to start the toggle sequence */
function _start()
{
_started = true;
_el.onmouseover = _toggleCheckbox;
}

/* private method to stop the toggle sequence */
function _stop(e)
{
e = e || window.event;
var target = e.srcElement || e.target;
if(target === _firstTarget)
{
target.checked = !_checked;
}
_started = false;
_el.onmouseup = null;
_el.onmouseover = null;
_firstTarget.onmouseout = null;
}

/* public methods to start or stop the toggler */
var o = {
start:function(){ init(); },
stop:function(){ _el.onmousedown = null; }
};
return o;
}
</script>

<script type="text/javascript">
var toggle;
window.onload = function()
{
toggle = new Toggler('section');
}
</script>

<div id="section">

<input type="checkbox"> Label 1

<input type="checkbox"> Label 2

<input type="checkbox"> Label 3

<input type="checkbox"> Label 4

<input type="checkbox"> Label 5

<input type="checkbox"> Label 6

<input type="checkbox"> Label 7

<input type="checkbox"> Label 8

<input type="checkbox"> Label 9

<input type="checkbox"> Label 10

</div>


COSI VA TUTTO MA SE IO ALL'INTERNO DEL DIV SECTION VOLESSI FARE UNA TABELLA NON MI VA PIU. COME POSSO FARLO FUNZIONARE ANCHE SE I CHECKBOX SONO DENTRO UNA TABELLA????

AIUTATEMI

GRAZIE
TOMMASO