function addButton(selected){
var add = "CNN News<img src=\"http://www.hotscripts.com/forums/images/cnn.gif\" alt=\"cnn\" style=\"width:67px; height:43px;\"/><img id=\"add\" src=\"http://www.hotscripts.com/forums/images/add.gif\" alt=\"Add\" />";
selected.innerHTML = add;
}
function removeButton(selected){
var add = "CNN News<img src=\"http://www.hotscripts.com/forums/images/cnn.gif\" alt=\"cnn\" style=\"width:67px; height:43px;\"/>";
selected.innerHTML = add;
}
Here my problem is:
when the mouse moved over image its not calling the addButton() but when mouse is outside of the image and on <a> element its calling the addButton() func.
<img> is a child of <a> element and its working fine in FF....
IE doesn't render innerHTML the same way as other browsers.
That is why you are having problems with your code.
Instead, define the 'add' image in the body and use javascript to toggle the display property.
Example: