P
philjhanna
Hi,
Does anyone know why I can't add return false with addEventListener in
firefox (1.0.6).
This demonstrates the problem
If return false is added to onmousedown then you can drag over the
image which you can do to myImg1 but not myImg2.
myImg3 just shows that the code should work as an alert is added to
this one.
<img name="myImg1" id="myImg1"
src="http://www.google.co.uk/intl/en_uk/images/logo.gif"
onmousedown="return false">
<img name="myImg2" id="myImg2"
src="http://www.google.co.uk/intl/en_uk/images/logo.gif">
<img name="myImg3" id="myImg3"
src="http://www.google.co.uk/intl/en_uk/images/logo.gif">
<script>
function doOnload(){
document.getElementById('myImg2').addEventListener('mousedown',function(){return
false;},true);
document.getElementById('myImg3').addEventListener('mousedown',function(){alert('down');},true);
}
window.addEventListener('load',doOnload,true);
</script>
Thanks anyone who can help.
Does anyone know why I can't add return false with addEventListener in
firefox (1.0.6).
This demonstrates the problem
If return false is added to onmousedown then you can drag over the
image which you can do to myImg1 but not myImg2.
myImg3 just shows that the code should work as an alert is added to
this one.
<img name="myImg1" id="myImg1"
src="http://www.google.co.uk/intl/en_uk/images/logo.gif"
onmousedown="return false">
<img name="myImg2" id="myImg2"
src="http://www.google.co.uk/intl/en_uk/images/logo.gif">
<img name="myImg3" id="myImg3"
src="http://www.google.co.uk/intl/en_uk/images/logo.gif">
<script>
function doOnload(){
document.getElementById('myImg2').addEventListener('mousedown',function(){return
false;},true);
document.getElementById('myImg3').addEventListener('mousedown',function(){alert('down');},true);
}
window.addEventListener('load',doOnload,true);
</script>
Thanks anyone who can help.