_com
07-09-2005, 02:58 PM
In IE 6 WIN I got a js console error message saying that an object is expected when writng the script like this:
<script type="text/javascript">
document.getElementById('largeImage').onload=function(){
unhideAllDivs ();
}
</script>
In IE 6 WIN doing this no js errors any more
<script type="text/javascript">
var document.getElementById('largeImage') = 'largeImg' ;
largeImg.onload=function(){
unhideAllDivs ();
}
</script>
What caused the error in the version without the declared var in IE 6 WIN ?
Is there a better way to write this?
<script type="text/javascript">
document.getElementById('largeImage').onload=function(){
unhideAllDivs ();
}
</script>
In IE 6 WIN doing this no js errors any more
<script type="text/javascript">
var document.getElementById('largeImage') = 'largeImg' ;
largeImg.onload=function(){
unhideAllDivs ();
}
</script>
What caused the error in the version without the declared var in IE 6 WIN ?
Is there a better way to write this?