David <ruleofthirds2003 (AT) yahoo (DOT) com> writes:
[
http://www.ruleofthirds.com ]
Quote:
On every web browser except Safari, this website works great. (Well,
by "every" I mean Mozilla, Netscape, and Internet Explorer, for Mac
and Windows). |
And nothing else will work.
In the portfolio pages, the doPic function contains two conditions:
if (ns5up || ie4up) {
....
else { if (ns5up == false && netscape == true) {
This pretty much excludes anything non-netscape and non-IE4+. If sure
excludes Opera and I would guess also Safari. Clicking on the image
has no effect when you don't match one of these tests.
You are also calling it with the "javascript
:" pseudo protocol. That
is bad for several reasons, and you should use the onclick event handler
instead.
Quote:
The problem lies with images swapping on rollover. |
That code could do with a fixup too. It contains:
document.images[imgLocation].src = eval(imgLocation + now + ".src");
A value for "imgLocation" would be "image1" and "now" is, e.g., 4.
You never need to use the eval function to access an object property
or variable value. It will work, but it is prettier to use
document.images[imgLocation].src = window[imgLocation + now].src;
or, since you know the value of that src property, you can just set
it directly:
document.images[imgLocation].src =
(now==0)?"../images/black.gif"

"images/"+now+"-thumb.gif");
Quote:
But Safari simply overlays the tiny black .gif on top of the image
it's being swapped with, leaving both images occupying the same
space (making it look like a small bite has been taken out of the
image). |
That is obviously a bug. It fails to refresh the part of the display
that is no longer covered by the image.
Quote:
Can I fix this for Safari users without creating a big headache for
myself? |
You could change the CSS property "visibility" to "hidden" instead of
changing the image to black.
Quote:
[Note: I'm no pro when it comes to coding, so my scripting may be a
little sloppier than some...] |
Not really, you overestimate most of the coders out there
/L
--
Lasse Reichstein Nielsen - lrn (AT) hotpop (DOT) com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'