Apologies if I appear a little "noobish" with events, but for whatever reason the following doesn't work for me:
var someDomRef = document.getElementByRef("refVal");
for(i=0;i<someDomRef.length;i++) { //or someDomRef.childNodes.length/someDomRef.TagRef.length
someDomRef.onmouseup = function() {
someDomRef.childNodes[i].onmouseover=function() {
if(someRef.onmouseup) {
//return false for the onmouseover handler of this(someDomRef.childNodes[i])
}
};
};
}
Each time I release the mouse button after holding it upon someDomRef, I find a "onmouseover could not be assigned to undefined object" error in the JS console. Any help would be greatly appreciated for solving this problem (note: I know that I can assign another event handler outside of the onmouseover function to itself on the condition of someDomRef.onmouseup, but I'd like to know of a way to achieve this from within that onmouseover itself (I've also tried assigning var x = someDomRef.childNodes[i] and passing it through as an argument to the conditional clause for someRef.onmouseup, but this doesn't work either (albeit it doesn't return an error for this attempt)).