Prosty skrypt wygląda tak:
Kod
(...)
ddList.ddRow = newRow;
ddList.ddContainer = container;
addEventSimple(ddList.ddRow,'mousedown',ddList.showDown);
},
showDown: function(e){
document.getElementById('info').innerHTML = 'nacisnieto przycisk';
addEventSimple(ddList.ddContainer,'mousemove',ddList.drag);
addEventSimple(ddList.ddContainer,'mouseup',ddList.empty);
},
drag: function(){
document.getElementById('info').innerHTML = 'trzymasz obiekt';
},
empty: function(){
document.getElementById('info').innerHTML = 'nie trzymasz obiektu';
}
ddList.ddRow = newRow;
ddList.ddContainer = container;
addEventSimple(ddList.ddRow,'mousedown',ddList.showDown);
},
showDown: function(e){
document.getElementById('info').innerHTML = 'nacisnieto przycisk';
addEventSimple(ddList.ddContainer,'mousemove',ddList.drag);
addEventSimple(ddList.ddContainer,'mouseup',ddList.empty);
},
drag: function(){
document.getElementById('info').innerHTML = 'trzymasz obiekt';
},
empty: function(){
document.getElementById('info').innerHTML = 'nie trzymasz obiektu';
}
Problem w tym, że działa akcja onmousedown i move, a jedyna niedziałającą jest akcja up. Może ma ktoś pomysł co źle napisałem?
Może ktoś mi podpowiedzieć?