[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

09/06/2009 at 05:51PM PDT, ID: 24711584
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

Weird javascript style background image issue in Safari on Mac

Asked by jasimon9 in Safari Web Browser, JavaScript

Tags: javascript background image

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?

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
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)';
	}
}
 
 
Loading Advertisement...
 
[+][-]09/06/09 06:55 PM, ID: 25272369

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Safari Web Browser, JavaScript
Tags: javascript background image
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]09/07/09 12:07 PM, ID: 25276777

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/07/09 12:10 PM, ID: 25276793

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/10/09 07:30 AM, ID: 25300591

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/12/09 02:34 PM, ID: 25317978

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74 - Hierarchy / EE_QW_EXPERT_20070906