I have a weird issue that is driving me nuts, because it makes no sense. I am not sure I am going to be able to give specific enough information, but I'd like to give e-e experts a shot at shedding some light.
We have a web page that I have put a new style of tabs on, by changing the background image. When the tab is clicked, it changes images to show a different background color, as well as changing the text color and weight. This works find in IE6, IE7, Firefox on Windows, Firefox on the Mac, and Safari on Windows. However, in Safari on the Mac, strangely when the tab is clicked, rather than displaying the proper image, the old version of the image is used, which is no longer on the server. This is of course the totally wrong image, and it a mystery.
I have cleared the Safari cache, and looked closely at the code. It would seem if the wrong image is coming from somewhere, the it would also affect the other browsers.
For the above reasons, I suspect that it is an artifact of my development environment, which is on the Mac that I am running the "safari on mac" test. So I am thinking it must be getting that image from my workstation, rather than from the development server. Of course, this makes no sense either.
The code shown in the code snippet is the main code that affects the change.
A second odd thing is that if instead of 'url(/images/tc_tab_hov.gif)' I insert at the front of the path the server name, then it also breaks it in the other browsers. However, this implies that in fact, Safari on the Mac is the only browser getting it right, and the other ones are somehow getting the correct image from some wrong place.
The whole thing makes no sense at this point.
Any ideas?
function setState(tabNum)
{
if (tabNum==currentPanel)
{
document.getElementById('tab'+tabNum).style.backgroundColor = '#ffffff';
document.getElementById('tab'+tabNum).style.color = 'red';
document.getElementById('tab'+tabNum).style.fontWeight = 'bold';
document.getElementById('tab'+tabNum).style.background = 'url(/images/tc_tab_hov.gif)';
}
else
{
document.getElementById('tab'+tabNum).style.backgroundColor = '#ddddff';
document.getElementById('tab'+tabNum).style.color = 'navy';
document.getElementById('tab'+tabNum).style.fontWeight = 'normal';
document.getElementById('tab'+tabNum).style.background = 'url(/images/tc_tab.gif)';
}
}
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
Select allOpen in new window
by: hieloPosted on 2009-09-06 at 18:55:24ID: 25272369
see if this helps
Select allOpen in new window