Hi,
A always, these damn browsers don't play ball I have the following code that will change the background color of a link (flashing);
"the_array" is an array of all the elements that match my "class" I'm looking out for.
This works 100% perfectly in FF, Chrome and Safari... but not IE as always! I'm guessing its got to do with the way I'm trying to change the CSS:
...so maybe this isn't valid in IE:
Can anyone suggest to me what I can do? I would imagine I need to add an extra conditional to check if its IE we are using, and then update it a slightly different way if thats the case.
TIA!
Andy
A always, these damn browsers don't play ball I have the following code that will change the background color of a link (flashing);
Code:
window.onload = function ()
{
the_array = getElementsByClassName(document,'flashingtext');
for (i = 0; i < the_array.length; i++) {
setInterval('flashtext(' + i + ')', 500 );
}
}
function flashtext(the_element) {
if (the_array[the_element].style.backgroundColor != start_color) {
the_array[the_element].style.backgroundColor = start_color;
} else {
the_array[the_element].style.backgroundColor = end_color;
}
}
"the_array" is an array of all the elements that match my "class" I'm looking out for.
This works 100% perfectly in FF, Chrome and Safari... but not IE as always! I'm guessing its got to do with the way I'm trying to change the CSS:
Code:
the_array[the_element].style.backgroundColor = end_color;
...so maybe this isn't valid in IE:
Code:
.style.backgroundColor = end_color;
Can anyone suggest to me what I can do? I would imagine I need to add an extra conditional to check if its IE we are using, and then update it a slightly different way if thats the case.
TIA!
Andy