Hi again,
Have an unexpected complication.
<span onclick="myFunction()">
<img onclick="this.parentElement.click();return;" class="myImage">
</span>
function myFunction(){
var tC;
if (event.srcElement.innerHTML){
tC = event.srcElement.children[0].className;
}
alert(tC);
}
---
This results in 2x alerts! Why? The first outputs myImage, the second is blank.
How best to filter out the junk?
----------
I'm willing to trade custom scripts for... [see profile]
Have an unexpected complication.
<span onclick="myFunction()">
<img onclick="this.parentElement.click();return;" class="myImage">
</span>
function myFunction(){
var tC;
if (event.srcElement.innerHTML){
tC = event.srcElement.children[0].className;
}
alert(tC);
}
---
This results in 2x alerts! Why? The first outputs myImage, the second is blank.
How best to filter out the junk?
----------
I'm willing to trade custom scripts for... [see profile]