1) Script Title:
showFilterButtons
2) Script URL :
www.roberto-colombo.com
3) Describe problem:
Hello,
I have been reported a bug on my script (working well with Netscape, IE5 etc.) with IE7.
A JS function simply change the image url, allowing to change the displayed image.
Something like:
if ( document.getElementById ) // IE5+ & Gecko
{
if ( document.getElementById( id ).innerHTML != null )
{
document.getElementById( id ).innerHTML.src = url;
}
}
else if ( document.getElementById ) // IE5+ & Gecko
{
if ( document.getElementById( id ) != null )
{
document.getElementById( id ).src = url;
}
}
else if (document.all) // IE4
{
if ( document.all[ id ] != null )
{
document.all[ id ].src = url;
}
}
else // Netscape 4
{
if ( document.images[ id ] != null )
{
document.images[ id ].src = url;
}
}
With IE7, this seems not working, no image is displayed. :-||
Of course, the "id" points to a valid image id, which is referenced in the HTML within the <img> tag.
Also, the same image id is created in JavaScript with the new Image() call.
In fact everything works fine with IE5, Netscape... did I miss anything regarding IE7 ?
Is there anythnig that should be changed ?
Can I still use document.getElementById in the same way ?
:-|
HELP...![]()



Reply With Quote



Bookmarks